package async_extra

  1. Overview
  2. Docs
Monadic concurrency library

Install

Dune Dependency

Authors

Maintainers

Sources

async_extra-v0.14.0.tar.gz
sha256=782a955450c0cbd3e978fef4d4b77422b1f15dac29ddd5298642cedb48520264
md5=e645c6df8dff3da2e56205b3c95f920c

doc/async_extra.async_bus/Async_bus/index.html

Module Async_busSource

Async operations on Core_kernel.Bus.

pipe1_exn t returns a pipe of updates from t by subscribing to t. Closing the pipe unsubscribes from t. Closing t closes the pipe. pipe1_exn raises in the same circumstances as subscribe_exn.

Sourcemodule First_arity : sig ... end

first_exn here t arity ~f returns a deferred that becomes determined with value r when the first event is published to t where f returns Some r. first_exn then unsubscribes from t, ensuring that f is never called again after it returns Some. first_exn raises if it can't subscribe to the bus, i.e., if subscribe_exn raises. If f raises, then first_exn raises to the monitor in effect when first_exn was called. first_exn takes time proportional to the number of bus subscribers.

If stop is provided and becomes determined, f will not be called again, it will unsubscribe from the bus, and the deferred that was returned by first_exn will never become determined.

OCaml

Innovation. Community. Security.