This is just an exploration of what a real-world (if incomplete) BMP183 driver might look like with the current iteration of Alamatic's featureset.
It makes extensive use of the worker
concept, which effectively creates a protothread that processes a queue of requests one at a time. A worker
can await
a promise, just like a Task can, but unlike a normal function.
This example seems to demonstrate that even this relatively simple example leads to a proliferation of workers, suggesting that if this concept is to work the protothreads must be very lightweight or else the program's memory and CPU usage could easily become dwarfed by protothread bookkeeping.