[omniORB] Problem with ORB shutdown on Windows 95
Sai-Lai Lo
S.Lo@uk.research.att.com
Fri, 9 Jul 1999 12:01:46 +0100
A colleague of mine has just pointed out to me that the current way of
shuting down the ORB does not work well when the application is running on
Windows 95 and is using MFC. The problem does not occur on Windows NT +
MFC.
The problem is that the ORB dll relies on a global destructor, which should
be called when main() returns, to kill the internal thread
outscavenger. This thread is responsible for scanning idle outgoing
connections and removed them if they have not been used for some time.
The global destructor scheme works on all other platforms except on Windows
95, which does not call the global destructor. This makes MFC very unhappy
as there is a non-MFC thread still running when its DLL is unloaded.
A short term solution is simply to disable the outscavenger. This can be
done either by calling
omniORB::idleConnectionScanPeriod(omniORB::idleOutgoing,0);
Or via the command line option:
-ORBoutConScanPeriod 0
There are 2 long term solutions:
1. Create an omnithread library using MFC threads, instead of the WIN32
threads.
2. Provide a function ORB::shutdown(), similar to BOA::shutdown() to allow
the application to call into the ORB before it exits.
We'll look into that.
Sai-Lai
--
Sai-Lai Lo S.Lo@uk.research.att.com
AT&T Laboratories Cambridge WWW: http://www.uk.research.att.com
24a Trumpington Street Tel: +44 1223 343000
Cambridge CB2 1QA Fax: +44 1223 313542
ENGLAND