[Enh] Tasks framework

Rob Withers rwithers12 at mediaone.net
Mon Aug 27 06:23:57 UTC 2001


This is a lightweight Task framework, that includes a background Task and a
MorphicTask, which probably does what other code (#addDeferredUIMessage:)
does, but I didn't change it yet.

The Task class forks a pocess, which performs an actionBlock while the
scheduleBlock returns true.  You can control the rate at which it drains,
although it is probably a good idea to drain as fast as you can.  You can
control the priority as well.

The MorphicTask registers into the stepping framework.  You can also control
the rate of draining in this class.   This is a nicer feature, as it allows
you to pump a lot of messages into the queue and still have a responsive UI
while the messages are drained.

One thing I do, with the async framework, is register an async proxy as
Transcript, which generates async messages, pumped with a MorphicTask.  Now
all code in the system that prints to the Transcript is threadsafe and
asynchronous.  It's nice.

- Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kernel-Tasks.1.cs
Type: application/octet-stream
Size: 7963 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010827/0595e037/Kernel-Tasks.1.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Tests-Tasks.1.cs
Type: application/octet-stream
Size: 2641 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010827/0595e037/Tests-Tasks.1.obj


More information about the Squeak-dev mailing list