This file is indexed.

/usr/share/doc/libghc-stm-chans-doc/html/Control-Concurrent-STM-TBMQueue.html is in libghc-stm-chans-doc 3.0.0.4-5build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!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>Control.Concurrent.STM.TBMQueue</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Concurrent-STM-TBMQueue.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Concurrent-STM-TBMQueue.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">stm-chans-3.0.0.4: Additional types of channels for STM.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>Copyright (c) 2011--2015 wren gayle romano</td></tr><tr><th>License</th><td>BSD</td></tr><tr><th>Maintainer</th><td>wren@community.haskell.org</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>non-portable (GHC STM, DeriveDataTypeable)</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Concurrent.STM.TBMQueue</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The TBMQueue type</a><ul><li><a href="#g:2">Creating TBMQueues</a></li><li><a href="#g:3">Reading from TBMQueues</a></li><li><a href="#g:4">Writing to TBMQueues</a></li><li><a href="#g:5">Closing TBMQueues</a></li><li><a href="#g:6">Predicates</a></li><li><a href="#g:7">Other functionality</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A version of <a href="file:///usr/share/doc/libghc-stm-doc/html/Control-Concurrent-STM-TQueue.html">Control.Concurrent.STM.TQueue</a> where the queue is
 bounded in length and closeable. This combines the abilities of
 <a href="file:///usr/share/doc/libghc-stm-doc/html/Control-Concurrent-STM-TBQueue.html">Control.Concurrent.STM.TBQueue</a> and <a href="Control-Concurrent-STM-TMQueue.html">Control.Concurrent.STM.TMQueue</a>.</p><p><em>Since: 2.0.0</em></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"><span class="keyword">data</span> <a href="#t:TBMQueue">TBMQueue</a> a</li><li class="src short"><a href="#v:newTBMQueue">newTBMQueue</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a)</li><li class="src short"><a href="#v:newTBMQueueIO">newTBMQueueIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a)</li><li class="src short"><a href="#v:readTBMQueue">readTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:tryReadTBMQueue">tryReadTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a))</li><li class="src short"><a href="#v:peekTBMQueue">peekTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:tryPeekTBMQueue">tryPeekTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a))</li><li class="src short"><a href="#v:writeTBMQueue">writeTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> ()</li><li class="src short"><a href="#v:tryWriteTBMQueue">tryWriteTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:unGetTBMQueue">unGetTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> ()</li><li class="src short"><a href="#v:closeTBMQueue">closeTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> ()</li><li class="src short"><a href="#v:isClosedTBMQueue">isClosedTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isEmptyTBMQueue">isEmptyTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFullTBMQueue">isFullTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:estimateFreeSlotsTBMQueue">estimateFreeSlotsTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:freeSlotsTBMQueue">freeSlotsTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li></ul></div><div id="interface"><h1 id="g:1">The TBMQueue type</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TBMQueue" class="def">TBMQueue</a> a <a href="src/Control-Concurrent-STM-TBMQueue.html#TBMQueue" class="link">Source</a> <a href="#t:TBMQueue" class="selflink">#</a></p><div class="doc"><p><code>TBMQueue</code> is an abstract type representing a bounded closeable
 FIFO queue.</p></div></div><h2 id="g:2">Creating TBMQueues</h2><div class="top"><p class="src"><a id="v:newTBMQueue" class="def">newTBMQueue</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a) <a href="src/Control-Concurrent-STM-TBMQueue.html#newTBMQueue" class="link">Source</a> <a href="#v:newTBMQueue" class="selflink">#</a></p><div class="doc"><p>Build and returns a new instance of <code>TBMQueue</code> with the given
 capacity. <em>N.B.</em>, we do not verify the capacity is positive, but
 if it is non-positive then <code><a href="Control-Concurrent-STM-TBMQueue.html#v:writeTBMQueue">writeTBMQueue</a></code> will always retry and
 <code><a href="Control-Concurrent-STM-TBMQueue.html#v:isFullTBMQueue">isFullTBMQueue</a></code> will always be true.</p></div></div><div class="top"><p class="src"><a id="v:newTBMQueueIO" class="def">newTBMQueueIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a) <a href="src/Control-Concurrent-STM-TBMQueue.html#newTBMQueueIO" class="link">Source</a> <a href="#v:newTBMQueueIO" class="selflink">#</a></p><div class="doc"><p><code>IO</code> version of <code><a href="Control-Concurrent-STM-TBMQueue.html#v:newTBMQueue">newTBMQueue</a></code>. This is useful for creating
 top-level <code>TBMQueue</code>s using <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code>, because using
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#v:atomically">atomically</a></code> inside <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code> isn't possible.</p></div></div><h2 id="g:3">Reading from TBMQueues</h2><div class="top"><p class="src"><a id="v:readTBMQueue" class="def">readTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-STM-TBMQueue.html#readTBMQueue" class="link">Source</a> <a href="#v:readTBMQueue" class="selflink">#</a></p><div class="doc"><p>Read the next value from the <code>TBMQueue</code>, retrying if the queue
 is empty (and not closed). We return <code>Nothing</code> immediately if
 the queue is closed and empty.</p></div></div><div class="top"><p class="src"><a id="v:tryReadTBMQueue" class="def">tryReadTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) <a href="src/Control-Concurrent-STM-TBMQueue.html#tryReadTBMQueue" class="link">Source</a> <a href="#v:tryReadTBMQueue" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Concurrent-STM-TBMQueue.html#v:readTBMQueue">readTBMQueue</a></code> which does not retry. Instead it
 returns <code>Just Nothing</code> if the queue is open but no value is
 available; it still returns <code>Nothing</code> if the queue is closed
 and empty.</p></div></div><div class="top"><p class="src"><a id="v:peekTBMQueue" class="def">peekTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-STM-TBMQueue.html#peekTBMQueue" class="link">Source</a> <a href="#v:peekTBMQueue" class="selflink">#</a></p><div class="doc"><p>Get the next value from the <code>TBMQueue</code> without removing it,
 retrying if the queue is empty.</p></div></div><div class="top"><p class="src"><a id="v:tryPeekTBMQueue" class="def">tryPeekTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)) <a href="src/Control-Concurrent-STM-TBMQueue.html#tryPeekTBMQueue" class="link">Source</a> <a href="#v:tryPeekTBMQueue" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Concurrent-STM-TBMQueue.html#v:peekTBMQueue">peekTBMQueue</a></code> which does not retry. Instead it
 returns <code>Just Nothing</code> if the queue is open but no value is
 available; it still returns <code>Nothing</code> if the queue is closed
 and empty.</p></div></div><h2 id="g:4">Writing to TBMQueues</h2><div class="top"><p class="src"><a id="v:writeTBMQueue" class="def">writeTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> () <a href="src/Control-Concurrent-STM-TBMQueue.html#writeTBMQueue" class="link">Source</a> <a href="#v:writeTBMQueue" class="selflink">#</a></p><div class="doc"><p>Write a value to a <code>TBMQueue</code>, retrying if the queue is full.
 If the queue is closed then the value is silently discarded.
 Use <code><a href="Control-Concurrent-STM-TBMQueue.html#v:isClosedTBMQueue">isClosedTBMQueue</a></code> to determine if the queue is closed
 before writing, as needed.</p></div></div><div class="top"><p class="src"><a id="v:tryWriteTBMQueue" class="def">tryWriteTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) <a href="src/Control-Concurrent-STM-TBMQueue.html#tryWriteTBMQueue" class="link">Source</a> <a href="#v:tryWriteTBMQueue" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Concurrent-STM-TBMQueue.html#v:writeTBMQueue">writeTBMQueue</a></code> which does not retry. Returns <code>Just
 True</code> if the value was successfully written, <code>Just False</code> if it
 could not be written (but the queue was open), and <code>Nothing</code>
 if it was discarded (i.e., the queue was closed).</p></div></div><div class="top"><p class="src"><a id="v:unGetTBMQueue" class="def">unGetTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> () <a href="src/Control-Concurrent-STM-TBMQueue.html#unGetTBMQueue" class="link">Source</a> <a href="#v:unGetTBMQueue" class="selflink">#</a></p><div class="doc"><p>Put a data item back onto a queue, where it will be the next
 item read. If the queue is closed then the value is silently
 discarded; you can use <code><a href="Control-Concurrent-STM-TBMQueue.html#v:peekTBMQueue">peekTBMQueue</a></code> to circumvent this in certain
 circumstances. <em>N.B.</em>, this could allow the queue to temporarily
 become longer than the specified limit, which is necessary to
 ensure that the item is indeed the next one read.</p></div></div><h2 id="g:5">Closing TBMQueues</h2><div class="top"><p class="src"><a id="v:closeTBMQueue" class="def">closeTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> () <a href="src/Control-Concurrent-STM-TBMQueue.html#closeTBMQueue" class="link">Source</a> <a href="#v:closeTBMQueue" class="selflink">#</a></p><div class="doc"><p>Closes the <code>TBMQueue</code>, preventing any further writes.</p></div></div><h2 id="g:6">Predicates</h2><div class="top"><p class="src"><a id="v:isClosedTBMQueue" class="def">isClosedTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Concurrent-STM-TBMQueue.html#isClosedTBMQueue" class="link">Source</a> <a href="#v:isClosedTBMQueue" class="selflink">#</a></p><div class="doc"><p>Returns <code>True</code> if the supplied <code>TBMQueue</code> has been closed.</p></div></div><div class="top"><p class="src"><a id="v:isEmptyTBMQueue" class="def">isEmptyTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Concurrent-STM-TBMQueue.html#isEmptyTBMQueue" class="link">Source</a> <a href="#v:isEmptyTBMQueue" class="selflink">#</a></p><div class="doc"><p>Returns <code>True</code> if the supplied <code>TBMQueue</code> is empty (i.e., has
 no elements). <em>N.B.</em>, a <code>TBMQueue</code> can be both `<code>empty'</code> and
 `<code>full'</code> at the same time, if the initial limit was non-positive.</p></div></div><div class="top"><p class="src"><a id="v:isFullTBMQueue" class="def">isFullTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Concurrent-STM-TBMQueue.html#isFullTBMQueue" class="link">Source</a> <a href="#v:isFullTBMQueue" class="selflink">#</a></p><div class="doc"><p>Returns <code>True</code> if the supplied <code>TBMQueue</code> is full (i.e., is
 over its limit). <em>N.B.</em>, a <code>TBMQueue</code> can be both `<code>empty'</code> and
 `<code>full'</code> at the same time, if the initial limit was non-positive.
 <em>N.B.</em>, a <code>TBMQueue</code> may still be full after reading, if
 <code><a href="Control-Concurrent-STM-TBMQueue.html#v:unGetTBMQueue">unGetTBMQueue</a></code> was used to go over the initial limit.</p><p>This is equivalent to: <code>liftM (&lt;= 0) estimateFreeSlotsTBMQueue</code></p></div></div><h2 id="g:7">Other functionality</h2><div class="top"><p class="src"><a id="v:estimateFreeSlotsTBMQueue" class="def">estimateFreeSlotsTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Control-Concurrent-STM-TBMQueue.html#estimateFreeSlotsTBMQueue" class="link">Source</a> <a href="#v:estimateFreeSlotsTBMQueue" class="selflink">#</a></p><div class="doc"><p>Estimate the number of free slots. If the result is positive,
 then it's a minimum bound; if it's non-positive then it's exact.
 It will only be negative if the initial limit was negative or
 if <code><a href="Control-Concurrent-STM-TBMQueue.html#v:unGetTBMQueue">unGetTBMQueue</a></code> was used to go over the initial limit.</p><p>This function always contends with writers, but only contends
 with readers when it has to; compare against <code><a href="Control-Concurrent-STM-TBMQueue.html#v:freeSlotsTBMQueue">freeSlotsTBMQueue</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:freeSlotsTBMQueue" class="def">freeSlotsTBMQueue</a> :: <a href="Control-Concurrent-STM-TBMQueue.html#t:TBMQueue">TBMQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Conc.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Control-Concurrent-STM-TBMQueue.html#freeSlotsTBMQueue" class="link">Source</a> <a href="#v:freeSlotsTBMQueue" class="selflink">#</a></p><div class="doc"><p>Return the exact number of free slots. The result can be
 negative if the initial limit was negative or if <code><a href="Control-Concurrent-STM-TBMQueue.html#v:unGetTBMQueue">unGetTBMQueue</a></code>
 was used to go over the initial limit.</p><p>This function always contends with both readers and writers;
 compare against <code><a href="Control-Concurrent-STM-TBMQueue.html#v:estimateFreeSlotsTBMQueue">estimateFreeSlotsTBMQueue</a></code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>