-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow oneshot::Receiver::close after successful try_recv
Before this commit `close` after successful `try_recv` panics. My use case is this: on drop, I call `close` to prevent pushing a message to the queue, and then fetch the message if any and process it. But if message is already processed, `close` panics. And there is no API to know if message was already fetched or not (except for writing a wrapped which would track that info, which would be an overkill). But generally `close` operation should be safe to be called any time.
- Loading branch information
1 parent
c9d2a36
commit b0f8283
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters