Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of Lwt_stream #1006

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/core/lwt_stream.mli
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ class type ['a] bounded_push = object
is already blocked on [push], it raises {!Lwt_stream.Full}. *)

method close : unit
(** Closes the stream. Any thread currently blocked on
{!Lwt_stream.bounded_push.push} fails with {!Lwt_stream.Closed}. *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe it should be {!Lwt_stream.bounded_push#push} but I find it hard to test or find resources for how to cross-reference methods.

(** Closes the stream. Any thread currently blocked on a call to
the [push] method fails with {!Lwt_stream.Closed}. *)

method count : int
(** Number of elements in the stream queue. *)

method blocked : bool
(** Is a thread is blocked on {!Lwt_stream.bounded_push.push} ? *)
(** Is a thread is blocked on a call to the [push] method? *)

method closed : bool
(** Is the stream closed ? *)
(** Is the stream closed? *)

method set_reference : 'a. 'a -> unit
(** Set the reference to an external source. *)
Expand Down
Loading