| >> - are all ObjectBroker APIs thread safe? If they are not, can we get
>> around this with a mutex?
> None are thread safe. If they use a mutex to ensure that only one thread
> at a time is in OBB, it's probably ok.
I would not assume this either. The ObjectBroker libraries use
alot of static and global data, some of which if I recall when
I did the IPMT case that lead to the discovery that you can't
have more than one OBB application running on Windows 3.1, is
that some of the global data is used to maintain state between
calls into ObjectBroker. So even if you use a global mutex and
lock/unlock around every call into ObjectBroker, multiple threads
using ObjectBroker could possibly still step on each other.
As Maryann said, your safest bet is to funnel all calls into
ObjectBroker through a single thread.
We are working towards a threadsafe ORB in the future for IIOP
(at least the 1st release will still be using some parts of OBB
classic internals so likely won't be completely thread-safe
until some subsequent release, but may be more usable, though
unsupported, in an environment of multiple threads calling
into the API).
|