On 20/12/2007, Tom Phoenix <rootbeer@redcat.com> wrote:Just try to run given code:
> On 12/20/07, Igor Stasenko <siguctua@gmail.com> wrote:
>
> > This is essentially useful when you need to guarantee that process
> > will stay suspended even if it's currently suspended waiting for
> > semaphore signal.
>
> Do you mean to say that your processes resume running before their
> semaphores are signaled?
>
| sema proc |
sema := Semaphore new.
proc := [ sema critical: [ Transcript show: 'Oopsie' ] ] fork.
Processor yield.
proc suspend.
proc resume.