Sleep() ?

U

Uli Kunkel

I have to wait in a loop until some condition is true.
What I want is to have some function that doesn't take the resources
while waiting.

Thanks for any suggestions.
 
M

Michael DOUBEZ

Uli Kunkel a écrit :
I have to wait in a loop until some condition is true.
What I want is to have some function that doesn't take the resources
while waiting.

Thanks for any suggestions.

There is no standard c++ way of doing. Depending on your OS and the
reactivity requiered you can wait for a signal (see conditions in POSIX
thread by example, sleep (in preemptive OS) or release the processor (in
cooperative OS).
 
D

DJ Dharme

I have to wait in a loop until some condition is true.
What I want is to have some function that doesn't take the resources
while waiting.

Thanks for any suggestions.

I thinks he is looking for something like "select" function.
 
D

DJ Dharme

I thinks he is looking for something like "select" function.

Sorry typo, the correct form would be

I think he is looking for something like "select" function.

Try googling for "select function"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,829
Latest member
KimberAlli

Latest Threads

Top