[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster-devel] static Object management (win32??)
Hi Michele, Marcel
Hope your both well. I notice your extremely busy at the moment. Well done
on the latest release.
Sorry I couldnt help your colleague with vc7 project.
>
> There also seems to be some problem with the clean up of the static
Global.
> The various semaphores etc are invalid shortly after main is left (so it
> would seem) and waiters are not woken as such. This just make the Timeout
> cleanup go into a tight loop forever.
>
I have looked at this further, I notice that you have even catered for it by
defining out calls that you feel block forever. The static global semantics
appears as follows. They have their destructors called as part of the
runtime cleanup procedure from _DllMainCRTStartup (DLL_PROCESS_DETACH). The
problem here is this is as result of a call TerminateProcess. Between
TerminateProcess and the DLL_PROCESS_DETACH message all threads bar the main
are terminated. So any code that is going to expect notification from
threads will no longer work. A exit status could be evaluated prior to
waiting on mutex's etc with locally created objects.could assist. This would
only fix some code. CorbaDriverFactory has the #define to skip code entirely
for this reason. A means of Object management is required to support the
object lifetimes etc.. This would probably require the offending objects
becoming pointers instead of statics which to my mind is no big deal. As it
stands now its broken. Do you feel this is an option? What do you think?
Regards
Martin