From 08a982456b35e455dc839a7450c0a1901df044c1 Mon Sep 17 00:00:00 2001 From: Jeremy Huffman Date: Fri, 1 Jan 2016 15:11:45 -0500 Subject: [PATCH] Update 3ch.md Add a note of caution re: fork, per haskell-distributed/distributed-process#245. --- tutorials/3ch.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/3ch.md b/tutorials/3ch.md index 405c451..680421e 100644 --- a/tutorials/3ch.md +++ b/tutorials/3ch.md @@ -530,6 +530,8 @@ liftIO; but [MonadBaseControl IO][mbc] also makes things like a lifted [withMVar really just a specialization of [bracket][lbrkt]. You will also find lots of other libraries on hackage which use these instances - at present count there are more than 150 [packages using it][reverse]. +One note of caution: This instance can enable use of functions such as `forkIO` (or, `fork` from lifted-base[lbase]) which compromise invariants in the `Process` monad and can lead to confusing and subtle issues. Always use the Cloud Haskell functions such as spawnLocal instead. + [1]: hackage.haskell.org/package/distributed-process/docs/Control-Distributed-Process.html#v:receiveWait [2]: hackage.haskell.org/package/distributed-process/docs/Control-Distributed-Process.html#v:expect