Mutex error?
Ron Teitelbaum
Ron at USMedRec.com
Mon Feb 19 14:33:04 UTC 2007
Thanks! It got me again!!
Ron
> -----Original Message-----
> From: David Shaffer [mailto:cdshaffer at acm.org]
> Sent: Sunday, February 18, 2007 2:43 PM
> To: Ron at USMedRec.com; The general-purpose Squeak developers list
> Subject: Re: Mutex error?
>
> I think the current Squeak compiler allocates block arguments and temps
> in the same context as the block is created in. Try naming the two
> block arguments differently:
>
> semaphore := Mutex new.
> [1 to: 100 do: [:i | semaphore critical:[ Transcript cr; show: i]]] fork.
> [101 to: 200 do: [:j | semaphore critical:[ Transcript cr; show: j]]]
> fork.
>
> Other options include sending fixTemps to the blocks to ensure that their
> temporary variables are actually different.
>
> David
>
>
More information about the Squeak-dev
mailing list
|