Skip to content
  • AndreasVoellmy's avatar
    Manager takes a flag that indicates whether it should de-register a file... · 8db9ad88
    AndreasVoellmy authored and tibbe's avatar tibbe committed
    Manager takes a flag that indicates whether it should de-register a file registration once it has received a callback.
    
    Previously, GHC.Event.Thread.threadWait calls unregister on the file in the callback. With this flag on, the manager now performs the deregistration so that GHC.Event.Thread.threadWait does not have to. The motivation for the change is that for the common case that we deregister after receiving the callback, we can provide a more efficient implementation which reduces the number of times the callback table lock is taken in half and also reduces the number of sysystem calls we make to the backend. This commit does not implement that optimization; it just paves the way for this change in future.
    8db9ad88