Commit 5b81a90d authored by AndreasVoellmy's avatar AndreasVoellmy Committed by tibbe

ioManagerCapabilitiesChanged takes no arguments and instead gets the current...

ioManagerCapabilitiesChanged takes no arguments and instead gets the current enabled number of capabilities by executing getNumCapabilities after it acquires a lock on the IO managers array.
parent cd924e95
......@@ -79,7 +79,7 @@ ensureIOManagerIsRunning = Event.ensureIOManagerIsRunning
ensureIOManagerIsRunning = Windows.ensureIOManagerIsRunning
#endif
ioManagerCapabilitiesChanged :: Int -> IO ()
ioManagerCapabilitiesChanged :: IO ()
#ifndef mingw32_HOST_OS
ioManagerCapabilitiesChanged = Event.ioManagerCapabilitiesChanged
#else
......
......@@ -322,9 +322,10 @@ shutdownManagers =
foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool
ioManagerCapabilitiesChanged :: Int -> IO ()
ioManagerCapabilitiesChanged new_n_caps = do
ioManagerCapabilitiesChanged :: IO ()
ioManagerCapabilitiesChanged = do
withMVar ioManagerLock $ \_ -> do
new_n_caps <- getNumCapabilities
numEnabled <- readIORef numEnabledEventManagers
writeIORef numEnabledEventManagers new_n_caps
eventManagerArray <- readIORef eventManager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment