Login  Register

Re: Cuis Smalltalk Port

Posted by garduino on Jan 17, 2013; 10:39pm
URL: https://forum.world.st/Cuis-Smalltalk-Port-tp4663610p4664054.html



2013/1/17 Janko Mivšek <[hidden email]>
Dne 17. 01. 2013 13:27, piše Germán Arduino:

>     This means it is very dangerous to use the returned process in code
> that stores it in some variable
>     and checks for nil to start a new one. If this methods happens to
> return after the new process is forked,
>     chances are the code that starts all this runs again, that variable
> is nil, and a second process is forked,
>     perhaps breaking some shared state. This kind of bug is hard to spot
> and debug.
>
>     Callers wanting the new process object, should call #newProcess,
> store the answer, and then #resume.
>
>     A way to ensure this bug will not ever happen again is just to
> answer nil"
>
>     self newProcess resume.
>     ^nil

So there is a portable workaround to create a process like p := Process
new, then put some executing block to it and lastly p resume? If so, we
can rewrite all Swazoo accordingly.



Yes, this is the recommendation of Juan and I agree with it. As soon as I can look into it again
(err, free time needed) I wll try to develop some bunch of compatible code and then I will comment
to your evaluation.


 
> Here the image is running normal, with or without Swazoo started (I've
> not loaded Aida yet) and lot of times happens that when I re-start the
> image (the next day) it load freezed.
>
> Must investigate....

Swazoo must be stopped before image shutdown and restarted after image
start and this is done by Sport's SpEnvironment
addImageShutdownTask:for: and addImageStartupTask:for:. Thoes Cuis
support this shutdown/startup functionality? Does SpEnvironment works
corretly here?




Good point, I will look into it asap.

Germán.

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida