10000 Clarify behaviour on drop of watch::Sender · Issue #57 · austinjones/postage-rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Clarify behaviour on drop of watch::Sender #57
Open
@ijackson

Description

@ijackson

The Sender isn't Clone so there can only be one. But, what happens if it's dropped?

The existence of Receiver::borrow implies that the contained value cannot be dropped until the last Receiver is dropped. (And, if it's not to be leaked, that's when it must be dropped.)

But what about the Stream impls? These all, ultimately, yield Option<T>. Does dropping the Sender cause a None (end of stream) indication, or does it just block forever? Should the Receiver impl FusedStream?

Knowing the answer to this might save us from wrapping up a watch in a contraption to ensure that receivers get notified of sender drop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0