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