diff --git a/moonpool/Moonpool_fib/Main/index.html b/moonpool/Moonpool_fib/Main/index.html index 6561ca89..7330ed6b 100644 --- a/moonpool/Moonpool_fib/Main/index.html +++ b/moonpool/Moonpool_fib/Main/index.html @@ -1,2 +1,2 @@ -
Moonpool_fib.MainMain thread.
This is evolved from Moonpool.Immediate_runner, but unlike it, this API assumes you run it in a thread (possibly the main thread) which will block until the initial computation is done.
This means it's reasonable to use Main.main (fun () -> do_everything) at the beginning of the program. Other Moonpool pools can be created for background tasks, etc. to do the heavy lifting, and the main thread (inside this immediate runner) can coordinate tasks via Fiber.await.
Aside from the fact that this blocks the caller thread, it is fairly similar to Background_thread in that there's a single worker to process tasks/fibers.
This handles effects, including the ones in Fiber.
val main : (Moonpool.Runner.t -> 'a) -> 'amain f runs f() in a scope that handles effects, including Fiber.await.
This scope can run background tasks as well, in a cooperative fashion.
Moonpool_fib.MainMain thread.
This is evolved from Moonpool.Immediate_runner, but unlike it, this API assumes you run it in a thread (possibly the main thread) which will block until the initial computation is done.
This means it's reasonable to use Main.main (fun () -> do_everything) at the beginning of the program. Other Moonpool pools can be created for background tasks, etc. to do the heavy lifting, and the main thread (inside this immediate runner) can coordinate tasks via Fiber.await.
Aside from the fact that this blocks the caller thread, it is fairly similar to Background_thread in that there's a single worker to process tasks/fibers.
This handles effects, including the ones in Fiber.
val main : (Moonpool.Runner.t -> 'a) -> 'amain f runs f() in a scope that handles effects, including Fiber.await.
This scope can run background tasks as well, in a cooperative fashion.
val main' : ?block_signals:bool -> unit -> (Moonpool.Runner.t -> 'a) -> 'aSame as main but with room for optional arguments.
spawn_ignore f is ignore (spawn f). The fiber will still affect termination of the parent, ie. the parent will exit only after this new fiber exits.
val spawn_top_ignore : on:Moonpool.Runner.t -> (unit -> _) -> unitLike spawn_top but ignores the result.
include module type of struct include Main endval main : (Moonpool.Runner.t -> 'a) -> 'amain f runs f() in a scope that handles effects, including Fiber.await.
This scope can run background tasks as well, in a cooperative fashion.