This is a simple Test for using the Mbed API which is included in the official Pico core.
With Mbed, a powerful RTOS is included, the Keil RTX5. It includes all features that a RTOS needs: Queues, Mailboxes, Samphores, EventFlags and much more. Alternatively, Events can be used as a cooperative OS approach. And of course both can be combinded.
This example uses a SSD1306 OLED, connected to I2C1, PE4 and PE5.