Overview
Features
Download
Documentation
Community
Add-Ons & Services

BlockingQueue

A general discussion forum.

BlockingQueue

Postby Foxhunter » 14 Jul 2009, 19:22

Is there anything like a Java BlockingQueue in the POCO libraries? I know it's not a difficult thing to create and POCO's mantra is not to reinvent the wheel, but this structure comes up a lot and I've noticed that Boost never really added it.
Foxhunter
 
Posts: 3
Joined: 13 Jul 2009, 23:52

Re: BlockingQueue

Postby guenter » 14 Jul 2009, 19:29

There's Poco::NotificationQueue which has a blocking dequeue operation (with optional timeout) that waits until there's something to dequeue. The other half of BlockingQueue, a blocking enqueue operation if the queue is too large, can be implemented by creating a class that combines a Poco::NotificationQueue and a Poco::Semaphore.
guenter
 
Posts: 1105
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest