[Pharo-dev] Responsible development

phil at highoctane.be phil at highoctane.be
Mon Dec 2 09:15:05 EST 2013


Same story with Swing UI in Java if you want decent performance.

http://en.wikipedia.org/wiki/SwingWorker

Phil



On Mon, Dec 2, 2013 at 3:10 PM, Esteban A. Maringolo
<emaringolo at gmail.com>wrote:

> 2013/12/2 Yuriy Tymchuk <yuriy.tymchuk at me.com>:
> > Yes, This is a nice idea, but I was telling about the other thing. It’s
> really simple to start a new process in Pharo. Maybe we should introduce
> common practices in pharo? When I was following Obj-C course, one of the
> fundamental thing that was taught: do time consuming tasks in the other
> process. So I want to write a chapter on the concurrent programming in
> Pharo, but is question is: am I missing something? Because this looks quite
> trivial.
>
> Unless you program everything based on callbacks, then even if you
> fork explicitly  (new Processes) or by means of Futures, Promises,
> etc... at one point you'll have to wait (it is, block) every time you
> need to update the UI.
>
> The good practice is to spend the least time possible running thing in
> the UI thread.
>
> But given the fact the VM is single process in terms of host OS,
> callbacks won't provide much resilience either.
>
> Regards,
>
> Esteban A. Maringolo
>
> ps: As an concrete example, Android will kill any process taking more
> than 5 seconds in the main thread. So EVERYTHING except events,
> painting and layout, must take less than that, and if you do I/O or
> computation, you have to use threads.
> Ref:
> http://developer.android.com/guide/components/processes-and-threads.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131202/7c156db5/attachment-0002.html>


More information about the Pharo-dev mailing list