Skip to content

StapledStream.send_eof should error out if you call it while send_all is pending #1180

Open

Description

@njsmith

Noticed while working on #823: normally, if you try to call send_eof on an object at the same time that another task is already calling send_all or wait_send_all_might_not_block, then send_eof should raise BusyResourceError. But StapledStream.send_eof calls self.send_stream.aclose, which has a different semantics: it interrupts any pending calls. So right now StapledStream.send_eof has the wrong semantics.

To solve this, StapledStream should detect when another task is already calling a send method, and in that case make send_eof raise an exception instead of calling self.send_stream.aclose.

I have a fix for this in my #823 branch, that I'll post shortly.

Activity

  1. added a commit that references this issue on Aug 9, 2019
    e5c67da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions