Skip to content

Deprecate socket sendall method in favor of SocketStream.send_all #291

@parity3

Description

@parity3

I looked at the high level async socket.sendall() trio 0.1.0 code and realized nothing would stop a user from calling sendall() from 2 tasks on the same socket, and having the individual lowlevel send()'s being intertwined, which is probably not what the user wants (ie fragmented/mashed sendall() data ordering).

Some options are:

  • write some concurrency protection, raise an error
  • write some documentation saying sendall() is not atomic
  • make sendall atomic (via locking/parking lots, etc because I don't think we can safely disable checkpoints)

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