Well, the test code which I reproduce below throws an error very quickly on Squeak. When I patch #critical:, the test runs out just fine.
Should this be adopted?
100 timesRepeat: [ | s procs | s := Semaphore forMutualExclusion. procs := (1 to: 50) collect: [:i | [Processor yield. [s critical: []] repeat] forkAt: Processor activeProcess priority - 1]. procs do: [:p | (Delay forMilliseconds: 2) wait. p terminate]. (Delay forMilliseconds: 100) wait. s isSignaled ifFalse: [self error: 'Failure to release critical semaphore']].
On 1/23/06, Cees De Groot cdegroot@gmail.com wrote:
Some more digging revealed a pending VW fix that might be related - it purports to fix a hole in Semaphore>>critical: and I wonder whether it might apply to Squeak as well.