Commit ad4eb7a7 authored by Gabor Greif's avatar Gabor Greif 💬 Committed by Marge Bot

Document the fact, that openFileBlocking can consume an OS thread indefinitely.

Also state that a deadlock can happen with the non-threaded runtime.
[ci skip]
parent 738e2912
......@@ -150,6 +150,11 @@ openFile fp im =
-- This can be useful for opening a FIFO for writing: if we open in
-- non-blocking mode then the open will fail if there are no readers,
-- whereas a blocking open will block until a reader appear.
--
-- Note: when blocking happens, an OS thread becomes tied up with the
-- processing, so the program must have at least another OS thread if
-- it wants to unblock itself. By corollary, a non-threaded runtime
-- will need a process-external trigger in order to become unblocked.
--
-- @since 4.4.0.0
openFileBlocking :: FilePath -> IOMode -> IO Handle
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment