Skip to content

Proposal: Make Eio.Flow.buffer_sink closable #834

@vog

Description

@vog

It would be handy if the flow returned by Eio.Flow.buffer_sink was closable, so it can be used by functions which close the flow.

The new signature would then be:

val buffer_sink : Stdlib.Buffer.t -> [ sink_ty | `Close ] Std.r

Questions:

  • Does this make sense to you? Would you accept a PR for that?
  • Should close () be implemented as a no-op, or should it make further write actions throw an exception?
  • Is the new signature backwards-compatible enough, or would that require a second function like closable_buffer_sink?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions