Looking at at the primitive comment in...
  Semaphore>>wait
     "excessSignals>0
        ifTrue: [excessSignals := excessSignals-1]
        ifFalse: [self addLastLink: Processor activeProcess suspend]"

I expected/hoped the following...
   Transcript clear.
   s := Semaphore new.
   p := [ Transcript crShow: '1'. s wait. Transcript crShow: '2' ] forkAt: 50.
   Transcript crShow: p isSuspended.
   s signal.

would produce
1
true
2

but I get
1
false
2

How do I determine from another thread if a Process is waiting on a
Semaphore,  or even better, waiting on a particular semaphore?

cheers -ben

Reply via email to