From ae8168ede5875bc61ef802cb45a383cb1cd4577d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 7 Nov 2012 14:49:11 +0200 Subject: [PATCH] Added extra explanation from Felipe --- yesod-core/Yesod/Handler.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yesod-core/Yesod/Handler.hs b/yesod-core/Yesod/Handler.hs index f84bcf51..493d7f0d 100644 --- a/yesod-core/Yesod/Handler.hs +++ b/yesod-core/Yesod/Handler.hs @@ -1038,6 +1038,10 @@ instance MonadBase IO (GHandler sub master) where -- @fork@ function is incompatible with the underlying @ResourceT@ system. -- Instead, if you must fork a separate thread, you should use -- @resourceForkIO@. +-- +-- Using fork usually leads to an exception that says +-- \"Control.Monad.Trans.Resource.register\': The mutable state is being accessed +-- after cleanup. Please contact the maintainers.\" instance MonadBaseControl IO (GHandler sub master) where data StM (GHandler sub master) a = StH (StM (ResourceT IO) a) liftBaseWith f = GHandler $ \reader ->