Page 1 of 1

Pi Pico _thread vs uasyncio, when to use which?

Posted: Tue Jun 30, 2026 2:00 am
by sam_python
Coming from web Python. MicroPython on Pico gives me both _thread (run on core 1) and uasyncio. When to pick which?

What I figured out:
  • _thread = dedicated CPU core, hardware parallel, good for hard-real-time tasks (motor PWM at fixed rate)
  • uasyncio = cooperative concurrency, good for I/O bound (read sensor + send WiFi + blink LED)
Question: can they mix safely? E.g., main core runs asyncio loop, second core runs threaded motor control. Shared state via mutex?

Untried so far. Anyone done dual-mode on Pico in production?