Arm Mbed OS support forum

How to use "Thread" type

Follow the website Thread - API references and tutorials | Mbed OS 6 Documentation
I try to use “Thread” type like examples on website.
But when i work on Online Mbed Simulator and copy the code, the console told me

/out/user_1615893500118.cpp:11:1: error: unknown type name ‘Thread’

i would like to know how to apply “Thread” on Online Mbed Simulator.
Thanks for your help!!!

To enter the Online Simulator, click


it doesn’t matter if you use Online compiler or not.
It matter about MbedOS version (must be 5+) and configuration (must be without Bare metal profile).
I tried to import and compile the first example from page what you mentioned and compilation is OK.

BR, Jan

1 Like

Thanks for your help so promptly!!!
Actually I just asked the wrong question. It should be ‘Online Simulator’ instead of the ‘Online Complier’
Do you know how to solve it?

Simulator is out of my knowledge, sorry.

BR, Jan

1 Like

The online simulator does not support threads, sadly.
I will say, my lab and another lab have been collaborating on mbed-benchtest, which provides a simulated RTOS scheduler running on a desktop PC. However currently it can only simulate Thread and the other RTOS classes, not any other of Mbed’s functionality.

1 Like

Thank you for your help. It solves my problem. I’ll try to use your benchtest if I need to.