Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Add function that will deal with forkIO-like functions #50

Closed
vrom911 opened this issue Nov 15, 2017 · 1 comment
Closed

Add function that will deal with forkIO-like functions #50

vrom911 opened this issue Nov 15, 2017 · 1 comment

Comments

@vrom911
Copy link
Contributor

vrom911 commented Nov 15, 2017

As it was very often pattern I've implemented

forkLogIO :: (MonadIO m, WithLogger m) => LoggerNameBox IO () -> m ThreadId
forkLogIO action = do
    logName <- askLoggerName
    liftIO $ forkIO $ usingLoggerName logName $ action

It would be helpful to have something more common not related only to forkIO.

@chshersh
Copy link
Contributor

@vrom911 This might be helpful! Especially with proper documentation and examples.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants