Hi,

thanks for answering.

> the questionable point here is that I am not sure we should call
> destructor code for PROCESS_DETACH too.  We should always see in front
> a thread-detach, so this call seems to be pretty superflous (and might
> be even wrong).

I am not doing destructor call neither in process_detach nor in 
thread_detach because they are not fired
while  ioThreadFunc is running. Destructor is called by mingw if I do 
FreeLibrary (which previously fires process_detach
and not thread_detach) and it makes ioThreadFunc to exit but thead:join in 
the destructor never returns.

If i previously call unload to manually call destructor, everything works 
( ioThreadFunc exits and thread:join happens) but
i get a second call to destructor afterwards.

The schema working in other os or win32 with other compilers is: without 
calling nothing on exit (neither FreeLibrary nor manual unload)
destructor is fired on program exit that ends ioThreadFunc and succeds in 
thread:join.

> If you want you can modify crt-code so that destructor are just called
> for detach-thread case.
>
How this should be done? Would this solve the issue?

victor


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to