Vuo is a parallelizing compiler. When you run a composition, Vuo schedules the nodes in the composition to run concurrently.
When you write a node class, you usually don't have to worry about making it thread-safe. Vuo handles most of the thread synchronization for you. Vuo guarantees that:
- All nodes' init functions will end before any node's event function begins.
- All nodes' event functions will end before any node's fini function begins.
- Multiple threads will never access a single node instance at the same time.
You do, however, need to handle a few cases of thread synchronization yourself:
- Resources shared across multiple instances of a node class need to be thread-safe.
- Resources shared across multiple node classes need to be thread-safe.
- If a node class spawns any new threads, these threads must not execute after the node's fini function ends.