Mutex error?

Philippe Marschall philippe.marschall at gmail.com
Mon Feb 19 15:09:23 UTC 2007


I have a stroke list at work for every time it gets me.

Philippe

2007/2/19, Ron Teitelbaum <Ron at usmedrec.com>:
> 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