From: Mido Peace Date: 2010-02-16T18:20:19+09:00 Subject: Re: Mutex Thx for your Help !! well , actually , I tried first of all to start a 'p' Process and to make it wait , ( for the mutex signal ), then later on my code , I will lunch a function that will increment the Value on the Semaphore , that my 'p' could enter the Mutex section and do its work !! So , I think the Error I did , is That I initialize the process without tellin' him to wait ( without the acquire function ) , and when I tried to call it later , it give me that error . now wihtin the Initialize , I added the call to acquire , Somethg like ; require 'Semaphore' class MyProcess < Thread def intializer () super(){ ... # Init Some Variables @semBegin = Semaphore.new(0) @semEnd = Semaphore.new(0) @semBegin.acquire() # here since the value is 0 , he will wait ... ... # Code to be exectured after recieving the Mutex Signal } end ... end #SomeWhere I will increment the Semaphore Value to wake up my process and push it to work !! in this way , I could keep my process Alive during the Application (waitin')... otherwise the process will ends when nothing is left to do !! ;) -- Posted via http://www.ruby-forum.com/.