For a Python programmer, before using threads in a MicroPython application, it makes a lot of sense to consider the potential consequences before immediately jumping to threads. There are a few important considerations that a developer needs to contemplate:
- Threads are not deterministic. When a Python thread is ready to execute, there is no mechanism in place for one thread to be executed before another.
- There is no real mechanism for controlling time slicing. Time slicing is when the CPU is shared between multiple threads that are currently ready to execute.
- To pass data around the application, developers may need to add additional complexities to their design, such as the use of queues. ...