[omniORB] Does an omniorb servant use omnithreads?

Duncan Grisby duncan@grisby.org
Sun Jun 9 21:53:00 2002


On Sunday 9 June, Gustavo Madrigal wrote:

> > What exactly are you trying to do?  Almost certainly you shouldn't be
> > solving your problem with a call to yield. Perhaps you need a
> > semaphore?
>
> I am trying to solve a similar problem to "readers and writers", but its 
> solution requires the first reader to lock the mutex and the last reader to 
> unlock the mutex (this is not possible with omni_mutex). Now that you 
> mentioned it, does omni_semaphore supports a thread calling wait() (and not 
> calling post()) and another thread calling post() after the first thread?

Yes, that's the whole point of semaphores. Condition variables allow
you to do the same sorts of things in conjunction with mutexes,
although with different semantics.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --