diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-02-01 11:40:47 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-02-01 11:40:47 +0000 |
commit | e4fdc426413d178c86d3ba93702aad5eb17734bf (patch) | |
tree | 8f80665cec5201ae2ff67cb36041d3a82a391a2d /rts/posix/OSThreads.c | |
parent | 80ce44f764633347ea15b570e3f758b6e7aecd63 (diff) | |
download | haskell-e4fdc426413d178c86d3ba93702aad5eb17734bf.tar.gz |
Partial fix for #926
It seems that when a program exits with open DLLs on Windows, the
system attempts to shut down the DLLs, but it also terminates (some
of?) the running threads. The RTS isn't prepared for threads to die
unexpectedly, so it sits around waiting for its workers to finish.
This bites in two places: ShutdownIOManager() in the the unthreaded
RTS, and shutdownCapability() in the threaded RTS. So far I've
modified the latter to notice when worker threads have died
unexpectedly and continue shutting down. It seems a bit trickier to
fix the unthreaded RTS, so for now the workaround for #926 is to use
the threaded RTS.
Diffstat (limited to 'rts/posix/OSThreads.c')
-rw-r--r-- | rts/posix/OSThreads.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index b30d08545d..79d395fd33 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -93,6 +93,14 @@ osThreadId() return pthread_self(); } +rtsBool +osThreadIsAlive(OSThreadId id) +{ + // no good way to implement this on POSIX, AFAICT. Returning true + // is safe. + return rtsTrue; +} + void initMutex(Mutex* pMut) { |