But...but..but..!
Ned Konz
ned at bike-nomad.com
Sat Apr 21 15:31:01 UTC 2001
On Saturday 21 April 2001 07:33, Tom wrote:
> It seems to me that #step implements a poor man's lightweight process.
> Is there any reason for not actually using separate lightweight processes?
> For a well-implemented LWP library, the overhead per thread should
> only be a few words.
Why wouldn't the existing Process class work for this? It's already pretty
lightweight, and you don't have to write anything new...
> There have been a few GUIs built around the idea of using lots of
> lightweight processes, active objects, or actors. (Incidentally, the best
> way for them to communicate seems to be via mailboxes asynchronous method
> calls, message passing, or pipes, not by calling each other's methods.)
> Such GUIs tend to be responsive and easier to program in my experience.
You can have it both ways: although right now Morphic runs in one thread, you
can use a SharedQueue to send evaluable things (BlockContexts, MessageSends,
etc.) to the Morphic event loop for evaluation in that process.
See addDeferredUIMessage: for details
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|