[omniORB] Py_ServantLocator Core Dump
uche.ogbuji@fourthought.com
uche.ogbuji@fourthought.com
Fri, 15 Sep 2000 11:49:51 -0600
> > It doesn't have anything to do with your core dump, but do you realise
> > that Python has a global interpreter lock? Only one thread can be
> > executing Python code at a time -- every few bytecode instructions,
> > the interpreter lock is unlocked to switch to a different thread. This
> > means that when your server is running Python code, only one processor
> > will be running at a time. Other processors will still be able to do
> > other omniORB tasks, like the early stages of operation dispatch, so
> > you will still get some advantages from the multiple processors.
>
> I was aware of the Python global lock. I implemented as I did for two
> reasons :-
>
> 1. Maybe in the future this limitation will be removed and my code will
> still be around and will be "ready to go".
> 2. Large parts of the processing are outside of Python, and they can be
> multi-threaded (as you describe above.)
You both probably know this, but for the general edification, I should note
that it's not as bad as it sounds. The global lock can be got around quite
easily for sections of your C code that don't manipulate Python objects and
internal structures.
I've seen a lot of Python/C code that could be a lot more efficient if this
fact were better taken advantage of.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python