HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

ModuleWin32-network-0.2.0.1Haskell2010

System.IOManager

A shim layer for `Win32-network`'s IOManager

  • 4 types
  • 2 values
newtypenewtype IOManager
#

This is public api to interact with the io manager; On Windows IOManager holds System.Win32.Async.IOManager.associateWithIOCompletionPort; on other platforms IOManager can run over any type, and thus is guaranteed to be no-op.

Constructors

withIOManager allows to do asynchronous io on Windows hiding the differences between posix and Win32.

It starts an io manger thread, which should be only one running at a time, so the best place to call it is very close to the main function and last for duration of the application.

Async IO operations which are using the iocp port should not leak out-side of withIOManager. They will be silently cancelled when withIOManager exists. In particular one should not return IOManager from withIOManager.

Deprecated API

2 declarations