Create a pipe for interprocess communication and return a
(readEnd, writeEnd) Handle pair.
When this function is used with WinIO enabled it's the caller's
responsibility to register the handles with the I/O manager. If this
is not done the operation will deadlock. Association can be done as
follows:
#if defined(IO_MANAGER_WINIO)
import GHC.IO.SubSystem ((<!>))
import GHC.IO.Handle.Windows (handleToHANDLE)
import GHC.Event.Windows (associateHandle')
#endif
...
#if defined(IO_MANAGER_WINIO)
return () <!> do
associateHandle' =<< handleToHANDLE readEnd
#endif
Only associate handles that you are in charge of read/writing to. Do
not associate handles passed to another process. It's the process's
responsibility to register the handle if it supports async access.