passing cmds up from the VM, was pending mac vm 3.2.4

Tim Rowledge tim at sumeru.stanford.edu
Wed Feb 20 00:02:50 UTC 2002


John M McIntosh <johnmci at smalltalkconsulting.com> is claimed by the authorities to have written:


> Now what interesting things can you do if you want to pass 
> information upwards and you have 6 integers to work with? Really of 
> course I want to invoke method fum against object foo with perhaps 
> some event driven data. My original thought was to build a character 
> string and invoke the compiler, but I'm not sure where to stick such 
> a string, and if for example allocating an object via 
> instantiateClassindexableSize would be safe. (Mind that I could 
> figure out by examining the code).
If you're handling events in a thread that is non-synchronous with the
main VM, you can't safely create objects. You might find the VM is in
the middle of creating one itself.... BOOM!

You could of course encode a short String into the 6 integers :-) or
perhaps stick with the more realistic suggestion from Andreas of
buffering the event info and adding prims to extract it later.

One of the more serious problems likely to surface is with events that
require immediate response from the application in order to function
correctly. I have no idea if this is still a problem but I do recall
that it was a serious hassle for VW on win3.1 some years ago.

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: LTT: Lose Timing Track




More information about the Squeak-dev mailing list