package miou

  1. Overview
  2. Docs
Composable concurrency primitives for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

miou-0.8.0.tbz
sha256=8cc05f77a23680a52a3008d461afed3b210c29c6cccdacd113232c41bab789fa
sha512=61bc945b1c8c15e65b927cae6837d18988d296f5797012acae5d245cc86be41c6fc3cf88ebe82670181acaaa1ed3f3b0648af63f8c768952bf4d834e5fa92bc2

doc/miou.runtime_events/Miou_runtime_events/index.html

Module Miou_runtime_eventsSource

The Miou Trace system with Runtime_events.

This module allows you to connect the trace data output by Miou to the Runtime_events module provided by OCaml using the reporter function. To ensure that the user has a trace of Miou events, they must call Miou.Trace.set_reporter Miou_runtime_events.reporter. It should be noted that the trace is only emitted if the environment variable MIOU_TRACE=1 exists.

This module also allows a consumer to be associated with Miou events using add_callbacks. In this way, the user, using the Runtime_events module, can obtain Miou events from a program via a cursor.

Sourceval reporter : Miou.Trace.event -> unit

reporter is a function to connect the Trace producer to the Runtime_events producer. If the user would like to emit trace from a Miou application, the program must be executed with MIOU_TRACE=1 and:

let () = Miou.Trace.set_reporter Miou_runtime_events.reporter

add_callbacks ~fn cbs adds a consumer fn for Miou events.

  let cursor = Runtime_events.create_cursor (Some (cwd, pid)) in
  let cbs = Runtime_events.Callbacks.create () in
  let cbs = Miou_runtime_events.add_callbacks ~fn cbs in
  ...
  let _ = Runtime_events.read_poll cursor cbs None in
  ...
  Runtime_events.free_cursor cursor