package moonpool
Pools of threads supported by a pool of domains
Install
Dune Dependency
Authors
Maintainers
Sources
moonpool-0.8.tbz
sha256=2c10792726b1c2e4987f0f2acca5c5c221ea5cc0a2b4c75ad4fd2709e32aab6f
sha512=801c399ae9b72dd5f84624cdee9bcbb56c5ed9c371001e00176e685686234b4135d69e48877412b25a5127ad59b729000d5422dad0c90e2ded2744b974dddeca
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 17 18 19 20 21 22 23 24 25 26
exception Oh_no of Exn_bt.t let main' ?(block_signals = false) () (f : Runner.t -> 'a) : 'a = let worker_st = Fifo_pool.Private_.create_single_threaded_state ~thread:(Thread.self ()) ~on_exn:(fun e bt -> raise (Oh_no (Exn_bt.make e bt))) () in let runner = Fifo_pool.Private_.runner_of_state worker_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 *) Moonpool.Private.Worker_loop_.worker_loop worker_st ~block_signals (* do not disturb existing thread *) ~ops:Fifo_pool.Private_.worker_ops; 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 let main f = main' () f ~block_signals:false (* do not disturb existing thread *)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>