package moonpool
Pools of threads supported by a pool of domains
Install
dune-project
Dependency
Authors
Maintainers
Sources
moonpool-0.6.tbz
sha256=3efd095c82a37bba8c7ab6a2532aee3c445ebe1ecaed84ef3ffb560bc65e7633
sha512=e4bcab82e6638299c2d0beb1dbf204f7b43379a5387418c6edff85b9bf90c13ad1bdd8eb44b69cd421268d1bc45bcf918bcf77e1c924348211ac27d6643aac78
doc/src/moonpool.fib/main.ml.html
Source file main.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
exception Oh_no of Exn_bt.t let main (f : Runner.t -> 'a) : 'a = let st = Fifo_pool.Private_.create_state ~threads:[| Thread.self () |] () in let runner = Fifo_pool.Private_.runner_of_state st in try let fiber = Fiber.spawn_top ~on:runner (fun () -> f runner) in Fiber.on_result fiber (fun _ -> Runner.shutdown_without_waiting runner); (* run the main thread *) Fifo_pool.Private_.run_thread st runner ~on_exn:(fun e bt -> raise (Oh_no (Exn_bt.make e bt))); match Fiber.peek fiber with | Some (Ok x) -> x | Some (Error ebt) -> Exn_bt.raise ebt | None -> assert false with Oh_no ebt -> Exn_bt.raise ebt
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>