Saving the image in the background
Avi Bryant
avi.bryant at gmail.com
Mon Jul 31 18:10:10 UTC 2006
On Jul 31, 2006, at 11:01 AM, Damien Cassou wrote:
> Damien Cassou wrote:
>> I would like to know if the following code is safe:
>> [SmalltalkImage current snapshot: true andQuit: false]
>> forkAt: Processor userBackgroundPriority
>> Is there any problem if the main process modifies something in the
>> same time ?
>
> I'm sorry not having been clear enough. I just wanted to save the
> image when a user modify the model. To avoid a long delay for him,
> I wanted to use a fork.
>
> But it seems this was not a good idea.
>
> My solution is to remove the fork and let the user wait some
> seconds :-)
Forking a separate Smalltalk process is a bad idea, but forking the
whole unix process works just fine. You just need to modify the
snapshot prim to do this. There was a long thread about this
earlier, here's a post with some code:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2005-October/
095896.html
I used a VM with that prim for months without any ill effects.
Avi
More information about the Squeak-dev
mailing list
|