[squeak-dev] Re: n-core Smalltalk at work [Re: Hydra now can do mitosis]

Rob Rothwell r.j.rothwell at gmail.com
Sun Feb 22 21:39:56 UTC 2009


On Sun, Feb 22, 2009 at 1:38 PM, Klaus D. Witzel <klaus.witzel at cobss.com>wrote:

> Yes, "classic" Hydra loads the second .image from file and mitosis Hydra
> populates (the second) an empty .image from am arrayOfObjects passed in.


Ok...this is just, well, fun, but I can't quite figure out how to get a
second image loaded with the #doIt channel "working."  I figure it's because
I don't have the image I created it from set up right?  All I did was go
down the line of in the Helpful doits workspace:

"Sanity check, are we running HydraVM?"
HydraVM isHydra  [true]

"To prepare an image for running in background thread (careful, VM will quit
if you run this)"
HydraVM saveAsHeadlessImage: 'test.image'  [current image shut down and
created another image]

"To run previously prepared image"
HydraVM loadAndRunNewImage: 'test.image'  [seemed to work]

"How many interpreters VM currently running"
HydraVM interpreterInstanceCount [2...this is good!]

"Test to check if main image listening for #transcript channel ..."
HydraChannel send: 'Transcript test' to: (HydraInterpreter current) channel:
#transcript [true after the following line]

"... if not, try doing this first: "
HydraTranscript install

"Simple test to check if second image listens #doIt channel "
HydraChannel hasChannel: #doIt at: (HydraInterpreter at: 2)  [false]

Drat!!!

" ... and has Transcript global var replaced to redirect all input to main
image"
(HydraInterpreter at: 2) doIt: 'Transcript show: ''Doit Test'''

"Do you like to install something to secondary image?"
(HydraInterpreter at: 2) doIt: '(HTTPSocket httpGet: ''
installer.pbwiki.com/f/Installer.st'') fileIn '

"Do you like to save it? "
(HydraInterpreter at: 2) doIt: 'Smalltalk snapshot: true andQuit: false '


Take care,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090222/b3dbae4e/attachment.htm


More information about the Squeak-dev mailing list