5 years ago.

Continue thread execution when external conditions turn true in RTOS?

I'm trying to convert code from an unknown/private language to mbed.

One of the functions of this program is to await for a condition to be true. in this first case I am investigating, it waits for a 500ms down timer to run out and for a certain variable to equal some other variables, which value's manipulated inside another thread. While it is awaiting for those conditions to turn true, with the timer continuously going down, it swaps to another thread.

I wanted to replicate this behaviour in mbed code - what is the best way to go about it? I thought maybe a while loops which waits for those conditions, and a Thread::wait inside it which waits something like 100ms time wait value... Would that be a good way to go about it? What sort of time value is good for this?

Be the first to answer this question.