package eio
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ba11ad486f492130dbb486f2b3bdc4905643f10016806ddf86e9a34e4346aaa5
sha512=57ef2c137ccdc26d8029e636b6a4ee92da7c6b2f35954946bd56ca595d6947a8ec42f6f83f8552f73d6719e6ce2314cae2e2fad1686a387522935e6f90e9a8d9
doc/eio/Eio/Private/Trace/index.html
Module Private.TraceSource
Trace Eio events using OCaml's runtime events system.
Each thread/fiber/promise is identified by a unique ID.
Recording events
Libraries and applications can use these functions to make the traces more useful.
log msg attaches text msg to the current fiber.
with_span op fn runs fn (), labelling the timespan during which it runs with op.
suspend_fiber op records that the current fiber is now suspended waiting for op.
Recording system events
These are normally only called by the scheduler.
create_fiber ~cc id records the creation of fiber id in context cc.
create_cc id ty records the creation of cancellation context id.
create_obj id ty records the creation of id.
get src records reading a promise, taking from a stream, taking a lock, etc.
try_get src records that the current fiber wants to get from src (which is not currently ready).
put dst records resolving a promise, adding to a stream, releasing a lock, etc.
suspend_domain records when the event loop is stopped waiting for events from the OS.
domain_spawn ~parent records that the current domain was spawned by fiber parent.
exit_cc () records that the current CC has finished.