RE: [Newbies] Re: Semaphore problems

2007-09-29 Thread Ron Teitelbaum
Hi Jason, I’m not really sure what you are trying to do but this works too. semA := Semaphore forMutualExclusion. semB := Semaphore new. [semA critical: [Transcript show: 'b1'; cr. semB signal. semA wait.]. Transcript show: 'b2'; cr. semB signal. ] fork. [semB critical: [Tra

Re: [Newbies] Re: Semaphore problems

2007-09-30 Thread Oscar Nierstrasz
Hi Folks, I think the problem is that we have race conditions due to the fact that Transcript is not thread-safe (as pointed out by Matthew). We can fix this either by making it thread-safe (using a mutex semaphore as suggested by Ron), or by simply enclosing our accesses to Transcript