Some days ago, Rudolf Schenke sent a message suggesting a block for threads on Raspberry Pi Pico. This site has a good explanation about threads on RPI Pico + MicroPython:
We implemented 2 simple blocks: one for timer and one for threads.
They can be used together, so we can get 3 tasks at once! Take a look at these 2 examples:
Timer blinks LED with 222 milliseconds interval while main prints messages to serial console at each 1 second.
Timer prints “Pico Timer” to serial console at each 500 milliseconds. Thread 1 prints “Thread 1” to console at each 222 milliseconds and finally, main prints “Main: xxx” each 2 seconds, where xxx is the number of milliseconds since the Pi Pico booted.
Example 2 Result