#fork and deterministic resumption of the resulting process

Igor Stasenko siguctua at gmail.com
Tue Feb 5 17:50:48 UTC 2008


On 05/02/2008, Joshua Gargus <schwa at fastmail.us> wrote:
[skip]
> >
> > If you want to make sure that after issuing stopWorkerProcess a worker
> > process don't running, you can modify a stopWorkerProcess to look
> > like:
> >
> > MyClass>>stopWorkerProcess
> >         "Stop the worker process"
> >       running := false. "let it terminate itself"
> >       self waitForProcessToFinish
>
> (implementation-specific comment, not really on-topic for the thread)
> This is undesirable because you block the "controller" process while
> it could be doing other useful work.
>
Again, this may or may not suit your needs. If your worker process
operating with another state, which should be accessed exclusively,
best way is to wait until it finishes before running another process,
rather than enclose every bit of code with semaphores and critical
sections.


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list