Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
quasar
Commits
0fe26b96
Commit
0fe26b96
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Add askResourceManager documentation
parent
5b287e01
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Quasar/Disposable.hs
+4
-3
4 additions, 3 deletions
src/Quasar/Disposable.hs
with
4 additions
and
3 deletions
src/Quasar/Disposable.hs
+
4
−
3
View file @
0fe26b96
...
@@ -232,11 +232,12 @@ class (MonadAwait m, MonadMask m, MonadIO m) => MonadResourceManager m where
...
@@ -232,11 +232,12 @@ class (MonadAwait m, MonadMask m, MonadIO m) => MonadResourceManager m where
localResourceManager
::
ResourceManager
->
m
a
->
m
a
localResourceManager
::
ResourceManager
->
m
a
->
m
a
-- | Get the underlying resource manager. This is intended to fork the Monad (e.g. in the `async`-Function) and must
-- not be used to dispose the resource manager (also doing so is a deadlock).
--
-- Might be replaced with an alternative mechanism in the future.
askResourceManager
::
m
ResourceManager
askResourceManager
::
m
ResourceManager
-- TODO askResourceManager could maybe be replaced with
--withRunResourceContextInIO :: (((forall f. MonadResourceManager f => f a) -> IO a) -> m b) -> m b
instance
(
MonadAwait
m
,
MonadMask
m
,
MonadIO
m
)
=>
MonadResourceManager
(
ReaderT
ResourceManager
m
)
where
instance
(
MonadAwait
m
,
MonadMask
m
,
MonadIO
m
)
=>
MonadResourceManager
(
ReaderT
ResourceManager
m
)
where
registerDisposable
disposable
=
do
registerDisposable
disposable
=
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment