[ANN] MessageCapture

Bert Freudenberg bert at freudenbergs.de
Sun Oct 15 12:56:38 UTC 2006


Actually, you could fork the VM, establish a communication channel  
(I've used named pipes on Unix, works without VM modification), send  
the future message over there, wait for the result. As long as no  
full GC happens in either process, this is even memory efficient on  
systems using copy-on-write memory pages.

Offloading to a different machine is a bit more involved because you  
might have to clone the execution state in the master image first.

- Bert -

Am 15.10.2006 um 14:46 schrieb Klaus D. Witzel:

> Hi Michael,
>
> how would you execute [ some long computation ] on another  
> processor or another computer.
>
> On another processor, Squeak does't work because its VM is neither  
> reentrant nor multiprocessing-capable (sorry for using terms which  
> are > 30 years old ;-)
>
> So it would be interesting to learn how you plan to offload [ some  
> long computation ] to another computer (or, FWIW, to another  
> process running on the same computer).
>
> /Klaus
>
> On Sun, 15 Oct 2006 08:56:48 +0200, Michael wrote:
>
>> I've been using a class called "MessageCapture" which lets you  
>> receive messages sent to an object. It's caused me no end of agony  
>> trying to get it working, so I thought I'd share my agony with the  
>> community :-P.
>>
>> Source code here: http://www.squeaksource.com/DPON.html - click on  
>> "latest", MessageCapture-mvdg.2.mcz.
>>
>> It's released under the.. umm... MIT license.
>>
>> Also included is a Future class, which lets you do things like:
>>
>> result := Future doing: [ some long computation ].
>>
>> This will return immediately, forking off a process to do the  
>> computation and replacing "result" with the result when it's  
>> finished.
>>
>> Some of the tests fail. Any hints / tips / guidance is very  
>> welcome! Especially as to how to capture #== and #class. Those two  
>> messages are sent by the interpreter even before doing a message  
>> lookup.
>>
>> Michael.
>>
>>
>>
>
>
>




More information about the Squeak-dev mailing list