[Pharo-dev] Responsible development

Esteban A. Maringolo emaringolo at gmail.com
Mon Dec 2 09:10:21 EST 2013


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




More information about the Pharo-dev mailing list