hs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before...
authorSimon Marlow <simonmar@microsoft.com>
Tue, 24 Jul 2007 15:30:57 +0000 (15:30 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 24 Jul 2007 15:30:57 +0000 (15:30 +0000)
This is pertinent to #1177.  When shutting down a DLL, we need to be
sure that there are no OS threads that can return to the code that we
are about to unload, and previously the threaded RTS was unsafe in
this respect.

When exiting a standalone program we don't have to be quite so
paranoid: all the code will disappear at the same time as any running
threads.  Happily exiting a program happens via a different path:
shutdownHaskellAndExit().  If we're about to exit(), then there's no
need to wait for foreign calls to complete.


No differences found