[omniORB] Threads management for omniORBpy

Duncan Grisby duncan at grisby.org
Fri Feb 11 17:03:16 GMT 2005


On Friday 11 February, Yura Smolsky wrote:

> Actually, I have very spicific problem. I am trying to use PyLucene
> lib ported from Java to Python through simple omniORBpy Servant.
> 
> Problem: PyLucene lib require all threads which operate to PyLucene
> object to be inherited from
> PyLucene.PythonThread. PythonThread is initializated from Java. So, I
> need somehow inherit all "worker" omniORB threads from PyLucene.PythonThread.

Ah. I'm afraid you won't be able to do that directly. omniORB requires
that its threads are started by itself. You won't be able to use Java
threads. 

What you'll have to do is yourself create a PyLucene thread for each
omniORB worker thread (you can use the worker thread hook to do that),
then for each call that needs to talk to Lucene, trigger the PyLucene
thread to do it for you. It's pretty easy to do that with a Queue object
or two.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list