summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-05-07 18:39:43 +0200
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:03 -0400
commit256299b13e17044d6904a85043130d13bc592a62 (patch)
tree3db2052f716898964cc4f0311eefabafc16699bd /libraries/base
parent06542b033116bfc4b47c80bdeab44ed1d99005bb (diff)
downloadhaskell-256299b13e17044d6904a85043130d13bc592a62.tar.gz
winio: Remove outstanding_requests from runner.
We used a variable to keep track of situations where we got entries from the IO port, but all of them had already been canceled. While we can avoid some work that way this case seems quite rare. So we give up on tracking this and instead always assume at least one of the returned entries is valid. If that's not the case no harm is done, we just perform some additional work. But it makes the runner easier to reason about. In particular we don't need to care if another thread modifies oustanding_requests after we return from waiting on the IO Port.
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/GHC/Event/Windows.hsc4
1 files changed, 1 insertions, 3 deletions
diff --git a/libraries/base/GHC/Event/Windows.hsc b/libraries/base/GHC/Event/Windows.hsc
index ccdc6e1144..113f0c0eb9 100644
--- a/libraries/base/GHC/Event/Windows.hsc
+++ b/libraries/base/GHC/Event/Windows.hsc
@@ -396,9 +396,7 @@ startIOManagerThread loop
| otherwise = do
modifyMVar_ ioManagerThread $ \old -> do
let create = do debugIO "spawning worker threads.."
- t <- if threadedIOMgr
- then forkOS loop
- else forkIO loop
+ t <- forkOS loop
debugIO $ "created io-manager threads."
labelThread t "IOManagerThread"
return (Just t)