[omniORB] Does an omniorb servant use omnithreads?

Duncan Grisby duncan@grisby.org
Sun Jun 9 21:23:01 2002


On Friday 7 June, Gustavo Madrigal wrote:

> I am writing a test servant using omniORB 3.0.4 with some
> sychronization using omnithreads. As I understand omni_mutex cannot
> be lock by a thread and unlocked by another [1]. So I am going to
> use a workaround which requires a servant method to call yield(). Is
> every servant thread an omnithread? If so, how can I get a pointer
> to the current omnithread?

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?

Anyway, to answer your question, yes the threads used to do upcalls to
servants are omnithreads. You can get a pointer to the current thread
with omni_thread::self().

Cheers,

Duncan.

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