Hang in TdwsGuardianThread.Finalize if used inside a DLL
Issue #1
new
What steps will reproduce the problem?
- Create a DLL with single DataModule and put DWScript on it.
- Use other app to load the DLL and create DataModule instance (not really necessary, just loading the DLL is enough).
- Unload the DLL -> TdwsGuardianThread.Finalize hangs (threads does not finish until the DLL unloading is finished).
What version of the product are you using? On what operating system?
Running SVN snapshot on Windows 7 x64 SP1
Comments (4)
-
repo owner -
reporter Yeah, it seems like an identical issue.
-
repo owner Then from what I gather the most stable solution would be to expose a function to your DLL that would call TdwsGuardianThread.Finalize, and call it manually before unloading the DLL :/
-
reporter Ahh, I understand. Would it be possible to add an Assert to the finalization section to notify developers? Perhaps something like:
Assert(not System.IsLibrary or not Assigned(TdwsGuardianThread.vThread), 'CAUTION: Please call TdwsGuardianThread.Finalize before unloading the DLL.');
- Log in to comment
Would it be similar to those issues ?
http://codeverge.com/embarcadero.delphi.general/tthread-in-delphi-dll-s-with-initi/1057724 http://blogs.remobjects.com/blogs/ck/2006/10/05/p121