<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic concurrent_bounded_queue usage in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822017#M1268</link>
    <description>Zooli&lt;BR /&gt;&lt;BR /&gt;There is a TBB forum which will be more appropriate for your query.&lt;BR /&gt;&lt;BR /&gt;Jim</description>
    <pubDate>Fri, 17 Sep 2010 20:55:01 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2010-09-17T20:55:01Z</dc:date>
    <item>
      <title>concurrent_bounded_queue usage</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822015#M1266</link>
      <description>Hi All , I am trying to use concurrent_bounded_queue for a producer/cosumer problem. &lt;BR /&gt;I want to have a background thread to collect the garbage. But my code is not working because the blocking "pop()"&lt;BR /&gt;never returns even if another thread adds an item to the Queue. &lt;BR /&gt;Most probably this could be something to do with my code and understanding . I expect the "push()"to notify the waiting "pop()" thread. Is it so ?&lt;BR /&gt;I am posting my basic idea here. Please help. &lt;BR /&gt;Thank you.&lt;BR /&gt;Zooli&lt;BR /&gt;&lt;PRE&gt;[bash]class GC
{

private :
	tbb::concurrent_bounded_queue nodequeue;

public :

	GC()
	{
	}
	
	void operator()()
	{
		while(true) {
		
			Item* pItem = 0;
			
			nodequeue.pop(pItem);
			
			delete pItem;
		
		}
	}

	void finalize(Item* pItem)
	{
		nodequeue.push(pItem);
		
	}

};

void main()
{
	GC gc;
	thread thread1(gc);
	......
/*Some other threads create and delete "Item" as main thread does below */
	......


	Item* pItem = create(); /* Main thread also create one item*/

	gc.finalize(pItem); /* Main thread adds "Item" for garbage collecton*/
	
	thread1.join();

};

[/bash]&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Sep 2010 06:56:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822015#M1266</guid>
      <dc:creator>zoolii</dc:creator>
      <dc:date>2010-09-16T06:56:48Z</dc:date>
    </item>
    <item>
      <title>concurrent_bounded_queue usage</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822016#M1267</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Anybody?.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;Zooli</description>
      <pubDate>Fri, 17 Sep 2010 04:45:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822016#M1267</guid>
      <dc:creator>zoolii</dc:creator>
      <dc:date>2010-09-17T04:45:29Z</dc:date>
    </item>
    <item>
      <title>concurrent_bounded_queue usage</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822017#M1268</link>
      <description>Zooli&lt;BR /&gt;&lt;BR /&gt;There is a TBB forum which will be more appropriate for your query.&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Fri, 17 Sep 2010 20:55:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822017#M1268</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-09-17T20:55:01Z</dc:date>
    </item>
    <item>
      <title>concurrent_bounded_queue usage</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822018#M1269</link>
      <description>&lt;P&gt;Thank you Jim, I am posting it to TBB forum.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 04:15:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/concurrent-bounded-queue-usage/m-p/822018#M1269</guid>
      <dc:creator>zoolii</dc:creator>
      <dc:date>2010-09-20T04:15:25Z</dc:date>
    </item>
  </channel>
</rss>

