-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Add more uninterruptible methods #1409
Comments
Also there are the Object.wait methods. I am guessing they are also used quite frequently. |
is there a reason that poll or offer has not been added? do they introduce something that will make people program incorrectly? such as #1118 ? |
I think we just haven't needed them yet. They seem fine to add as far as I can tell. |
Could this be made more generic, for running any arbitrary operation that throws
|
Maybe there are enough voices to add more methods now? We would benefit from BlockingQueue.offer() and poll() too. |
@thecoop For time-limited operations, we'd need to pass the total time into the helper method, which in turn would pass the remaining time as an argument to the functional parameter. |
@cpovirk l am beginner when it comes to contributing to open-source of Guava. I would like to work on this issue. I am planning to implement two methods offerUninterruptibly(long timeout, TimeUnit unit) and pollUninterruptibly(long timeout, TimeUnit unit). Please let me know if I can start working on this! Thanks |
That sounds great. Go for it! (I have some other things that I need to get back to people about, so I might not review it immediately, but I'll be sure to get to it.) |
Ack. |
@cpovirk Please review per your convenience. |
All errors fixed, Please review 4034 |
@cpovirk Please suggest me next issue to work on, a small feature enhancement will be good too :) |
Original issue created by Ash2kk on 2013-05-12 at 10:33 AM
Currently Uninterruptibles have putUninterruptibly() and takeUninterruptibly() methods for BlockingQueue. Consider adding helper methods for other interruptible methods: offer(Object, long, TimeUnit) and poll(long, TimeUnit).
Also there is BlockingDeque interface with many more interruptible methods.
Related to issue #1212 and issue #1315.
The text was updated successfully, but these errors were encountered: