Communicating between containers: https://github.com/toitlang/toit/blob/master/examples/service.toit
https://discordapp.com/channels/918498540232253480/1025033748661665792/1090917500599947326
From the above I would infer that "process" is equivalent to "container". Is that true?
@RobvanLopik Almost, but not entirely. We allow multiple processes within one container, but it is somewhat uncommon to use.
So typically there is a one-to-one correspondance.
Using spawn doesn't really create a new container, but it does start another process from within the same container.
This raises the question how processes and containers are scheduled. And how this relates to tasks. Probably is has been written down somewhere, but I could do with a 101.
Containers are scheduled with triggers that govern starting and stopping.
Within the containers, the processes have priorities and are scheduled without taking containers into account (one pool of prioritized processes).
The scheduling of processes is preemptive and runs across multiple cores in parallel.
Within a process, the tasks are cooperatively scheduled with a simple round-robin strategy.
We go to the next task when yielding, blocking or (often) leaving synchronization primitives (monitors).