-
Notifications
You must be signed in to change notification settings - Fork 1.8k
wait_dequeue and wait_dequeue_bulk with time out. #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Cool, thanks! I'll take a look as soon as I can. |
|
BTW... I've seen that for wait it is used semaphores. which is good, but so nice as std::shared_future::wait_for. What do you think? |
|
Hi @cameron314 , any news? |
|
Sorry! I've been busy. I'll take a look this weekend! |
|
In general, there's also no performance guarantees on most of the C++11 higher-level threading primitives -- I prefer to work with a raw OS-level construct wrapped with any data structure-specific performance enhancements necessary. |
|
I looked at the diff -- there's a lot of small things (style, mixing std::printf/std::cout, design of public API, etc.) that aren't quite the way I want them, so unfortunately I can't merge this in as-is. I'm going to use the core OS-level waiting code you added as an example, though -- thank you! |
|
Closing this issue along with #22 -- timed waits are now implemented! Yay! Let me know if you see an issue. |
Here is BlockingConcurrentQueue::wait_dequeue or BlockingConcurrentQueue::wait_dequeue_bulk with time out. tested on linux. remain to test on windows and osx. The code is almost the same as for readwritequeue.