Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 2288

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GHC.Conc.IO</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_GHC-Conc-IO.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">base-4.5.1.0: Basic libraries</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable (GHC extensions)</td></tr><tr><th>Stability</th><td>internal</td></tr><tr><th>Maintainer</th><td>cvs-ghc@haskell.org</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">GHC.Conc.IO</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Waiting
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Basic concurrency stuff.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:ensureIOManagerIsRunning">ensureIOManagerIsRunning</a> :: <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:threadDelay">threadDelay</a> :: <a href="Data-Int.html#t:Int">Int</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:registerDelay">registerDelay</a> :: <a href="Data-Int.html#t:Int">Int</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-Conc.html#t:TVar">TVar</a> <a href="Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:threadWaitRead">threadWaitRead</a> :: <a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:threadWaitWrite">threadWaitWrite</a> :: <a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:closeFdWith">closeFdWith</a> :: (<a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:ensureIOManagerIsRunning" class="def">ensureIOManagerIsRunning</a> :: <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></p></div><h1 id="g:1">Waiting
</h1><div class="top"><p class="src"><a name="v:threadDelay" class="def">threadDelay</a> :: <a href="Data-Int.html#t:Int">Int</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></p><div class="doc"><p>Suspends the current thread for a given number of microseconds
 (GHC only).
</p><p>There is no guarantee that the thread will be rescheduled promptly
 when the delay has expired, but the thread will never continue to
 run <em>earlier</em> than specified.
</p></div></div><div class="top"><p class="src"><a name="v:registerDelay" class="def">registerDelay</a> :: <a href="Data-Int.html#t:Int">Int</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-Conc.html#t:TVar">TVar</a> <a href="Data-Bool.html#t:Bool">Bool</a>)</p><div class="doc"><p>Set the value of returned TVar to True after a given number of
 microseconds. The caveats associated with threadDelay also apply.
</p></div></div><div class="top"><p class="src"><a name="v:threadWaitRead" class="def">threadWaitRead</a> :: <a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></p><div class="doc"><p>Block the current thread until data is available to read on the
 given file descriptor (GHC only).
</p><p>This will throw an <code>IOError</code> if the file descriptor was closed
 while this thread was blocked.  To safely close a file descriptor
 that has been used with <code><a href="GHC-Conc-IO.html#v:threadWaitRead">threadWaitRead</a></code>, use <code><a href="GHC-Conc-IO.html#v:closeFdWith">closeFdWith</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:threadWaitWrite" class="def">threadWaitWrite</a> :: <a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></p><div class="doc"><p>Block the current thread until data can be written to the
 given file descriptor (GHC only).
</p><p>This will throw an <code>IOError</code> if the file descriptor was closed
 while this thread was blocked.  To safely close a file descriptor
 that has been used with <code><a href="GHC-Conc-IO.html#v:threadWaitWrite">threadWaitWrite</a></code>, use <code><a href="GHC-Conc-IO.html#v:closeFdWith">closeFdWith</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:closeFdWith" class="def">closeFdWith</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>)</td><td class="doc"><p>Low-level action that performs the real close.
</p></td></tr><tr><td class="src">-&gt; <a href="System-Posix-Types.html#t:Fd">Fd</a></td><td class="doc"><p>File descriptor to close.
</p></td></tr><tr><td class="src">-&gt; <a href="System-IO.html#t:IO">IO</a> <a href="../ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Close a file descriptor in a concurrency-safe way (GHC only).  If
 you are using <code><a href="GHC-Conc-IO.html#v:threadWaitRead">threadWaitRead</a></code> or <code><a href="GHC-Conc-IO.html#v:threadWaitWrite">threadWaitWrite</a></code> to perform
 blocking I/O, you <em>must</em> use this function to close file
 descriptors, or blocked threads may not be woken.
</p><p>Any threads that are blocked on the file descriptor via
 <code><a href="GHC-Conc-IO.html#v:threadWaitRead">threadWaitRead</a></code> or <code><a href="GHC-Conc-IO.html#v:threadWaitWrite">threadWaitWrite</a></code> will be unblocked by having
 IO exceptions thrown.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>