Currently, if a domain has some suspended tasks, it does not take the opportunity to take a new task. That's mostly means that when a domain took a task which has some blockers, it will be busy on this specific task until the termination. In the case of a "daemon" task, a domain will be busy with only one even if the daemon does nothing.
However, certain patterns require that some tasks was really in parallel: two subsequent uses of Miou.call don't assert that 2 domains will be used. So we probably need to provide something where we assert that 2 tasks will be run in parallel in anyway. For in instance, we should have:
let prms = Miou.in_parallel [ p0; p1 ] in
Miou.await_all prms
Such case exists in our test (basics/t03.exe) where we must launch tasks in parallel - otherwise, we will get a dead-lock.
Currently, if a domain has some suspended tasks, it does not take the opportunity to take a new task. That's mostly means that when a domain took a task which has some blockers, it will be busy on this specific task until the termination. In the case of a "daemon" task, a domain will be busy with only one even if the daemon does nothing.
It can be interesting to let an opportunity of a domains to take a task even if it has some suspended tasks. See (
glist
is pending tasks,clist
is tasks to cancel andblist
is blockers): https://github.com/roburio/miou/blob/0ca25ddb410a26155d77df8ee3780d34302f7d92/lib/miou.ml#L504-L507However, certain patterns require that some tasks was really in parallel: two subsequent uses of
Miou.call
don't assert that 2 domains will be used. So we probably need to provide something where we assert that 2 tasks will be run in parallel in anyway. For in instance, we should have:Such case exists in our test (
basics/t03.exe
) where we must launch tasks in parallel - otherwise, we will get a dead-lock.