Commit d8b94b38 authored by AndreasVoellmy's avatar AndreasVoellmy Committed by tibbe

Workaround buggy kqueue on os x.

On OS X, set haveOneShot = False and always wakeup the manager after a fd is registered.
parent 2abd38c1
......@@ -135,7 +135,9 @@ callbackTableVar mgr fd = emFds mgr ! hashFd fd
haveOneShot :: Bool
{-# INLINE haveOneShot #-}
#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
#if defined(darwin_HOST_OS)
haveOneShot = False
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
haveOneShot = True
#else
haveOneShot = False
......@@ -316,7 +318,9 @@ registerFd mgr cb fd evs = do
-- | Wake up the event manager.
wakeManager :: EventManager -> IO ()
#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
#if defined(darwin_HOST_OS)
wakeManager mgr = sendWakeup (emControl mgr)
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
wakeManager _ = return ()
#else
wakeManager mgr = sendWakeup (emControl mgr)
......
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