Skip to content
Snippets Groups Projects
Commit 83ea9c08 authored by Jens Nolte's avatar Jens Nolte
Browse files

Add more ShortIO functions

parent a2c0091d
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,11 @@ module Quasar.Utils.ShortIO (
forkIOShortIO,
forkIOWithUnmaskShortIO,
throwToShortIO,
newUniqueShortIO,
-- ** Some specific functions required internally
peekAwaitableShortIO,
newAsyncVarShortIO,
putAsyncVarShortIO_,
) where
......@@ -36,9 +38,15 @@ forkIOWithUnmaskShortIO fn = ShortIO $ forkIOWithUnmask fn
throwToShortIO :: Exception e => ThreadId -> e -> ShortIO ()
throwToShortIO tid ex = ShortIO $ throwTo tid ex
newUniqueShortIO :: ShortIO Unique
newUniqueShortIO = ShortIO newUnique
peekAwaitableShortIO :: Awaitable r -> ShortIO (Maybe r)
peekAwaitableShortIO awaitable = ShortIO $ peekAwaitable awaitable
newAsyncVarShortIO :: ShortIO (AsyncVar a)
newAsyncVarShortIO = ShortIO newAsyncVar
putAsyncVarShortIO_ :: AsyncVar a -> a -> ShortIO ()
putAsyncVarShortIO_ var value = ShortIO $ putAsyncVar_ var value
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment