[omniORB] Omni_mutex and static global object

Alex Tingle alex.omniorb at firetree.net
Thu Sep 16 09:38:31 BST 2004


Harri Pasanen <harri.pasanen at trema.com> wrote:

> GNU/g++ older than 3.3.x on HP-UX.   I know gcc on AIX used to
> have it as well, don't remember the version.

Thanks. I'll watch out for them.

> The fact that initialization and shutdown orders are arbitrary is also
> a problem, especially if one of those objects is holding a lock.

I wouldn't call that a problem. If you use static initialisers, you must
accept that you have no control over the order of execution. Ada has a
pragma which enables the programmer to specify the order, but there's no
such mechanism in C++, as far as I know.

So I agree, you'd be mad to do anything that required locking a mutex
(for example) before you get to main().

-Alex

-- 
:: alex tingle
:: 58 kings way, harrow, mddx. uk. HA1 1XU
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the omniORB-list mailing list