diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-11-08 09:29:16 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-08 09:29:16 -0500 |
commit | 638f38c50e80a19275f3a06535a0dd8130a17a53 (patch) | |
tree | ac18855cd2f39544e4841866fbabb3f86a4d1f35 /libraries/base | |
parent | b1d2c1f3246b3740589a59bdf7648c13de47c32b (diff) | |
parent | 07e82ba52228580cfbd90ff031e657acbecc715b (diff) | |
download | haskell-638f38c50e80a19275f3a06535a0dd8130a17a53.tar.gz |
Merge remote-tracking branch 'origin/wip/tsan/all'
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Event/Control.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/GHC/Event/Control.hs b/libraries/base/GHC/Event/Control.hs index a9f23e07d2..9054da4f22 100644 --- a/libraries/base/GHC/Event/Control.hs +++ b/libraries/base/GHC/Event/Control.hs @@ -123,6 +123,10 @@ newControl shouldRegister = allocaArray 2 $ \fds -> do -- the RTS, then *BEFORE* the wakeup file is closed, we must call -- c_setIOManagerWakeupFd (-1), so that the RTS does not try to use the wakeup -- file after it has been closed. +-- +-- Note, however, that even if we do the above, this function is still racy +-- since we do not synchronize between here and ioManagerWakeup. +-- ioManagerWakeup ignores failures that arise from this case. closeControl :: Control -> IO () closeControl w = do _ <- atomicSwapIORef (controlIsDead w) True |