<?xml version="1.0" encoding="windows-1252"?>
<node id="952472" title="Re^2: Boolean Thread::Semaphore ?" created="2012-02-08 07:12:48" updated="2012-02-08 07:12:48">
<type id="11">
note</type>
<author id="869476">
chrestomanci</author>
<data>
<field name="doctext">
&lt;p&gt;I am doing that, the work finding thread is putting the work it finds into a [mod://Thread::Queue] object.&lt;/p&gt;

&lt;p&gt;The reason I want to use a semaphore as well is because the work finder runs much faster than the workers, but is quite expensive in terms of resource consumption.&lt;/p&gt;

&lt;p&gt;If there was not a mechanism to pause the work finder when there is enough work in the queue, it would build a queue of millions of items and waste a lot of memory and other resources in the process.&lt;/p&gt;</field>
<field name="root_node">
952465</field>
<field name="parent_node">
952468</field>
</data>
</node>
