Module Concurrent_in_thread

An implementation of concurrency that spawns tasks as systhreads onto domains.

The spawn options are interpreted as follows:

val scheduler : Base.unit Concurrent.Scheduler.t @@ portable

scheduler is a concurrent scheduler which spawns tasks as systhreads onto domains, using await as the implementation of awaiting

val create : Await.Await.t @ local portable -> Base.unit Concurrent.t @ local portable @@ portable

create await is an implementation of concurrency which spawns tasks as systhreads onto domains, using await as the implementation of awaiting

val with_blocking : Await.Terminator.t @ local -> (f:(Base.unit Concurrent.t @ local portable -> 'r) @ local once -> 'r) @ local @@ portable

with_blocking terminator ~f calls f with an implementation of concurrency that spawns preemptively scheduled threads onto arbitrary (managed) domains.

All scopes created using this implementation of concurrency block the calling thread using Await_blocking. If you rely on this thread to run the Async scheduler, instead call create with an implementation of awaiting from Await_in_async.

val spawn_into : ('a, _) Concurrent.Spawn.t @ local -> ('a, Base.unit) Concurrent.Spawn.t @ local @@ portable

spawn_into spawn is a Concurrent.Spawn.t which spawns task into the scope associated with the given spawn as threads in arbitrary (managed) domains.

val in_scope : Await.Await.t @ local -> ('a Await.Scope.t @ local -> ('a, Base.unit) Concurrent.Spawn.t @ local portable) @ local @@ portable

in_scope await scope is a Concurrent.Spawn.t which spawns tasks into the given scope as threads in arbitrary (managed) domains, and uses await as its implementation of awaiting

module Expert = Multicore