4 ms·
There is no event loop. You make lightweight threads called tasks, and they can block on things or wait for each other. https://docs.toit.io/language/tasks htt
by ErikCorry 4y ago
There is no event loop. You make lightweight threads called tasks, and they can block on things or wait for each other.
https://docs.toit.io/language/tasks https://docs.toit.io/language/tasks
Synchronization: https://libs.toit.io/monitor/library-summary https://libs.toit.io/monitor/library-summary
For example the GPIO pin has a wait_for method which pauses a task until a signal is seen. https://libs.toit.io/gpio/class-Pin https://libs.toit.io/gpio/class-Pin