package capnp-rpc
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=4b59a4147cf6e49c650dbfa4cdb918aec3be69cffd1ef6b5c818584464feb987
sha512=69114597e9cd8ad42c72c1751796b216f98f2a9f09f50a0628b4a3259c2f9b169fd47a73be7b76cfda298a6c202bc79762116865272e35ca0d0914242ace34d7
doc/capnp-rpc.proto/Capnp_rpc_proto/Local_struct_promise/Make/argument-1-C/Wire/index.html
Module C.Wire
The core RPC logic can be used with different serialisation systems. The appropriate types should be provided here.
module Path : sig ... end
A field in a message that refers to a capability.
module Response : sig ... end
ref_leak_detected thread_id fn
is called when a promise or capability is GC'd while its ref-count is non-zero, indicating that resources may have been leaked. fn ()
will log a warning about this and free the resources itself. The reason for going via ref_leak_detected
rather than calling fn
directly is because the OCaml GC may detect the problem at any point (e.g. while we're sending another message). The implementation should arrange for fn
to be called at a safe point in thread thread_id
(e.g. when returning to the thread's main loop). Unit-tests may wish to call fn
immediately to show the error and then fail the test.