Re: [Pharo-dev] mutex optimisation - #ifTrue:ifFalse versus #ifNil:ifNotNil: [ignore last post]

2016-02-18 Thread Ben Coman
Whoops, sorry, that last post shot off half done. Please delete it.

[Pharo-dev] mutex optimisation - #ifTrue:ifFalse versus #ifNil:ifNotNil:

2016-02-18 Thread Ben Coman
The Mutex primitives return a tri-state value: true, false and nil. So we would have... NewMutex>>critical: mutuallyExcludedBlock ifLocked: alternativeBlock ^lock tryAcquire ifNil: mutuallyExcludedBlock ifNotNil: [:acquired| acquired ifTrue: