[Newbies] UI not threaded?

Michael van der Gulik mikevdg at gmail.com
Tue Oct 28 22:53:32 UTC 2008


On Tue, Oct 28, 2008 at 4:05 PM, Greg Buchholz
<sleepingsquirrel at yahoo.com>wrote:

>    I notice that the system isn't responsive when something else is running
> (for example, while starting up an application like SqueakMap).  Can anyone
> point me in the direction of a document describing Squeak's theory of
> operation when it comes to threads and/or the user interface?  Is Squeak a
> cooperative multi-tasking system, or is the UI single threaded, or...?
>


I don't know about documentation, but I can tell you what I know.

Smalltalk, the language rather than implementations, has good support for
multitasking and is (in my opinion) one of the best languages for doing
concurrent programming.

The Squeak VM unfortunately only runs on a single OS process. It can't use
multiple CPU cores. I believe this is the case for all other available
Smalltalk VMs except for GemStone?

The VM does simulate multiple "green threads". In your code, you can do:

[ some code ] fork.

Which will create another process to run "some code" in parallel. There are
semaphores available for synchronisation and higher-level abstractions can
be built. However, the scheduler that Squeak uses doesn't perform very well
and code can easily be starved of CPU time.

Like Bert said, Morphic is, unfortunately, single-threaded.

Gulik.

-- 
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20081029/71bddcde/attachment.htm


More information about the Beginners mailing list