[Vm-dev] An event driven Squeak VM
stephen at pairhome.net
Thu Nov 12 14:01:24 UTC 2009
On Thu, Nov 12, 2009 at 6:56 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:
> On 10.11.2009, at 09:00, Andreas Raab wrote:
> > ... make the Squeak VM be "truly event driven" that is invoke it in
> response to OS or other events instead of having the VM poll.
> Don't have time to really get involved but I like the idea :)
> - Bert -
Same here (I've only skimmed this thread)...I think making the VM event
driven is a great idea (generally speaking). One benefit is that it lends
itself well to wrapping an image/vm as a shared library with efficient
inbound calls. It's also very similar to what you'd need for running on
bare hardware where input is eventful (via interrupts). I would just say
that the code listening for and processing the events should be done in
Smalltalk as much as is practical at this time.
In the case of running on bare hardware, an interrupt might actually be
interrupting interpret(), so you would want to handle that interrupt quickly
and safely (from a concurrent access perspective)...for example, you might
want to queue an event in some safely shared structure and exit. To allow
for this and similar circumstances involving shared libraries...I could
imagine two interfaces...queueEvent() and interpret().
Just some thoughts.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev