mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
details
This commit is contained in:
parent
2a42f15e37
commit
4ab76d5084
2 changed files with 5 additions and 0 deletions
|
|
@ -1,11 +1,13 @@
|
|||
open Types_
|
||||
include Runner
|
||||
|
||||
(* convenient alias *)
|
||||
let k_ls = Task_local_storage.Private_.Storage.k_storage
|
||||
|
||||
let run_async_ ~name ~ls f =
|
||||
let cur_ls = ref ls in
|
||||
TLS.set k_ls (Some cur_ls);
|
||||
cur_ls := ls;
|
||||
let sp = Tracing_.enter_span name in
|
||||
try
|
||||
let x = f () in
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
Another situation is when threads cannot be used at all (e.g. because you
|
||||
plan to call [Unix.fork] later).
|
||||
|
||||
{b NOTE}: this does not handle the [Suspend] effect, so [await], fork-join,
|
||||
etc. will {b NOT} work on this runner.
|
||||
|
||||
@since 0.5
|
||||
*)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue