8000 futures::sink::Sink implementation for dispatch channel broken · Issue #45 · austinjones/postage-rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
futures::sink::Sink implementation for dispatch channel broken #45
Closed
@tobz

Description

@tobz

In attempting to use the futures::sink::Sink implementation for postage::dispatch::Sender, it became pretty evident that the implementation around Sink::start_send is broken. Specifically, if the underlying queue is full -- since the poll_ready implementation doesn't reserve a send slot -- it returns an error, but swallows the item that was handed over.

Effectively, this makes it unusable for the given Sink implementation. The push method on the queue hands back the item if there's an error, so it seems like SendError should become an enum to differentiate between a closed channel and a rejected send.

(I also realize that the Sink trait itself is fraught with peril and will likely go the way of the dodo given the issues with the path to std stabilization, but nonetheless...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0