Updated 3.8.2 updates

Andreas Raab andreas.raab at gmx.de
Thu Nov 15 16:50:47 UTC 2007


Diego Gomez Deck wrote:
> I'm not sure of this is the final wanted shape for Semaphore>>critical
> (From 6755SemaCritical):

The update contains the correct version. The tests at

   http://bugs.squeak.org/view.php?id=6588

will confirm it (they cover all the "interesting" situations). Also, if 
you look at the update in question, you'll find that the "other half" of 
the fix is in Process>>terminate (which ain't nice but works for now).

Cheers,
   - Andreas

> 
> critical: mutuallyExcludedBlock
> 
> 	"Evaluate mutuallyExcludedBlock only if the receiver is not currently in
> 	the process of running the critical: message. If the receiver is, evaluate
> 	mutuallyExcludedBlock after the other critical: message is finished."
> 
> 	| blockValue caught |
> 
> 	caught := false.
> 	[
> 		caught := true.
> 		self wait.
> 		blockValue := mutuallyExcludedBlock value
> 	] ensure: [caught ifTrue: [self signal]].
> 
> 	^blockValue
> 
> 
> There was a bit of discussion about putting the "caught" flag AFTER the
> wait.  Something like:
> 
> 		self wait.
> 		caught := true. "signal the flag just after we got the semaphore"
> 
> 
> See http://tech.groups.yahoo.com/group/squeak/message/123504 for an
> explanation from Andreas.
> 
> Cheers,
> 
> -- Diego
> 
> 
>> Hi all,
>>
>> I put up an updated set of updates for 3.8.2 here:
>> http://impara.de/~michael/proposed-3.8.2.zip
>>
>> If no major problems turn up I would like to push those tomorrow or so.
>>
>> Michael
> 
> 
> 
> 




More information about the Squeak-dev mailing list