Warning about fork vs resourceForkIO
This commit is contained in:
parent
ed5e65ae95
commit
a144b56928
@ -1034,6 +1034,10 @@ instance MonadIO (GHandler sub master) where
|
|||||||
liftIO = GHandler . const . lift
|
liftIO = GHandler . const . lift
|
||||||
instance MonadBase IO (GHandler sub master) where
|
instance MonadBase IO (GHandler sub master) where
|
||||||
liftBase = GHandler . const . lift
|
liftBase = GHandler . const . lift
|
||||||
|
-- | Note: although we provide a @MonadBaseControl@ instance, @lifted-base@'s
|
||||||
|
-- @fork@ function is incompatible with the underlying @ResourceT@ system.
|
||||||
|
-- Instead, if you must fork a separate thread, you should use
|
||||||
|
-- @resourceForkIO@.
|
||||||
instance MonadBaseControl IO (GHandler sub master) where
|
instance MonadBaseControl IO (GHandler sub master) where
|
||||||
data StM (GHandler sub master) a = StH (StM (ResourceT IO) a)
|
data StM (GHandler sub master) a = StH (StM (ResourceT IO) a)
|
||||||
liftBaseWith f = GHandler $ \reader ->
|
liftBaseWith f = GHandler $ \reader ->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user