Multithreaded Squeak

Ned Konz ned at bike-nomad.com
Wed Nov 27 04:34:25 UTC 2002


On Tuesday 26 November 2002 08:16 pm, Philip Metz wrote:
> Has there been any discussion of a multithreaded Squeak, i.e.
> where messages can be sent and received asynchronously?
> It seems to me that some applications could benefit from such
> a capability, e.g. a user interface that needs to maintain near
> real-time response, while the applications does intense processing
> in the background.

Squeak *is* multithreaded. It doesn't use operating system threads, 
preferring to supply its own (this is much more portable and lighter 
weight).

> Is this incompatible with the basic design of Smalltalk, or just
> very difficult to implement? Would it destroy some desirable
> properties of Squeak's architecture?

Neither. It's easy.

[ something doSomethingVeryTimeConsuming ] forkAt: Processor 
userBackgroundPriority.

Look at: Semaphore, SharedQueue and SharedStreams (on SqueakMap). 
Process, and the #fork and #forkAt: methods.

Also open up a ProcessBrowser (World menu/debug/open Process Browser) 
to look at and control the various processes.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list