diff --git a/src/Quasar/Core.hs b/src/Quasar/Core.hs index ef458232b5a4e52f570a624c6823e2b797475663..c07fa2264ba45fb71b604a0353e384d31a996316 100644 --- a/src/Quasar/Core.hs +++ b/src/Quasar/Core.hs @@ -255,8 +255,10 @@ boundDisposable action = do resourceManager <- askResourceManager attachDisposeAction resourceManager action +-- | Creates an `Disposable` that is bound to a ResourceManager. It will automatically be disposed when the resource manager is disposed. attachDisposeAction :: MonadIO m => ResourceManager -> IO (Awaitable ()) -> m Disposable attachDisposeAction = undefined +-- | Attaches a dispose action to a ResourceManager. It will automatically be run when the resource manager is disposed. attachDisposeAction_ :: MonadIO m => ResourceManager -> IO (Awaitable ()) -> m () attachDisposeAction_ resourceManager action = void $ attachDisposeAction resourceManager action