Ben may be you should also submit this to the VM dev list
Le 18/11/14 18:59, Ben Coman a écrit :
I went looking at the oldest cases, and found issue 5959 interesting
and perhaps within my scope for my first foray into the VM.
On build 40360 with the following test script...
| sema proc |
Transcript clear.
sema := Semaphore new.
proc := [ sema wait. Transcript crShow: 'signalled' ]
proc priority: Processor highestPriority .
proc resume.
proc suspend.
Transcript crShow: 1.
proc resume.
Transcript crShow: 2.
sema signal.
Transcript crShow: 'excessSignals=' ; show: sema excessSignals
Prior loading attached changeset gives...
1
signalled
2
excessSignals=1
After loading attached changeset gives...
1
2
signalled
excessSignals=0
btw, for the test script you need to add
Semaphore>>excessSignals
^excessSignals
The changeset loads on top of VMMaker updating:
* CoInterpreterPrimitives>>primitiveSuspend
* CoInterpreterPrimitives>>primitiveResume
Now I probably have abused myList to keep the semaphore for
primitiveResume to reactive, but I did poke around references to
MyListIndex and it seemed myList was written to more than read from.
-----------
In the issue there was mention that some libraries may rely on the
broken semantics. Anyone know which those might be?
cheers -ben
https://pharo.fogbugz.com/default.asp?5959