-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add is_closed and closed operations to Lwt_stream #223
Commits on Mar 13, 2016
-
Before this commit the Lwt_stream API provided no reliable way to detect if a stream had been closed. While on_termination notifies the user if the stream is closed in the future, it does not tell the user if the stream was closed in the past. Introducing the is_closed function addresses this problem, allowing the user to detect if a stream has been closed at any point in time.
Configuration menu - View commit details
-
Copy full SHA for d11b100 - Browse repository at this point
Copy the full SHA d11b100View commit details -
This function returns a thread that will sleep until the stream is closed. The thread can be used in place of if_closed and on_terminate to detect when a stream is closed at any point in time.
Configuration menu - View commit details
-
Copy full SHA for c3e5aa3 - Browse repository at this point
Copy the full SHA c3e5aa3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1fbc72 - Browse repository at this point
Copy the full SHA b1fbc72View commit details
Commits on May 2, 2016
-
do not call termination hooks in from_direct constructor
The hooks will be called at the appropriate time once `f` finally returns `None`.
Configuration menu - View commit details
-
Copy full SHA for 398b953 - Browse repository at this point
Copy the full SHA 398b953View commit details -
implement Lwt_stream.on_termination in terms of Lwt.closed
As per the discussion on the issue tracker, Lwt_stream.on_termination will be deprecated and ultimately removed in favor for Lwt_stream.closed. To facilitate that, this commit introduces a new implementation of Lwt_stream.closed that does not rely on termination hooks, and implementation Lwt_stream.on_termination in terms of Lwt_Stream.closed.
Configuration menu - View commit details
-
Copy full SHA for c7918c0 - Browse repository at this point
Copy the full SHA c7918c0View commit details -
deduplcate code with enqueue functions
The Lwt_stream module had multiple copies of low-level enqueueing code of two varieties copied in serveral places.This commit moves one variety of enqueing code into a single function called enqueue', and implements the second variety as the function enqueue, in terms of enqueue'.
Configuration menu - View commit details
-
Copy full SHA for f2f4d3b - Browse repository at this point
Copy the full SHA f2f4d3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9aed80 - Browse repository at this point
Copy the full SHA b9aed80View commit details
Commits on May 3, 2016
-
change close semantics for fixed-length sources
Previously, the of_list, of_array, and of_string constructors each would produce a stream s for which is_closed s = false This is counter-intuitive as all the elements of the stream s have been generated and should be consumable without blocking. This commit changes the behavior of this constructors such that is_closed s = true immediately upon creation.
Configuration menu - View commit details
-
Copy full SHA for 47cd91f - Browse repository at this point
Copy the full SHA 47cd91fView commit details
Commits on May 4, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 6aec9a6 - Browse repository at this point
Copy the full SHA 6aec9a6View commit details
Commits on May 5, 2016
-
Revert "change close semantics for fixed-length sources"
This reverts commit 47cd91f.
Configuration menu - View commit details
-
Copy full SHA for 15001ef - Browse repository at this point
Copy the full SHA 15001efView commit details