Skip to content

Instantly share code, notes, and snippets.

@codedmart
Created December 2, 2014 16:29
Show Gist options
  • Save codedmart/aa9e4b03c10515c205af to your computer and use it in GitHub Desktop.
Save codedmart/aa9e4b03c10515c205af to your computer and use it in GitHub Desktop.
weak <- mkWeakPtr mbox $ Just $ do
closeToken h tok -- TODO: don't close if already closed
atomicModifyIORef' (rdbWait h) $ \mboxes ->
(M.delete tok mboxes, ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment