On 23 April 2013 23:19, Sean P. DeNigris <sean@clipperadams.com> wrote:
Igor Stasenko wrote
well, #createProcessFor: implies that copy get's the pointer to process. no need to pass it back to sender.
I need the return value because I need to suspend and resume the process from the original Timer, which is what the GUI holds a pointer to.
ah ok. well, you see, you have too many concerns combined at single point. so, why then it surprises you that code is so ugly? :) ... and btw, with such additional concern i fear that you will become a victim of another pitfall: - suspending process which waits on semaphore (delay) may be resumed without your permission by signaling that semaphore (when delay expires). and the problem is a design flaw in Semaphore/Process implementation which treats a process which waits on semaphore as 'suspended'. You can look for mailing list archive for discussion about that (if i remember, i raised this issue first in squeak mailing list).
----- Cheers, Sean -- View this message in context: http://forum.world.st/Terminating-a-Process-when-an-object-dies-tp4683036p46... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.