K
Koo
How do you create your own blocking function?
Koo
Koo
Koo said:How do you create your own blocking function?
That's a system call, not part of the language.
The function often looks like this:
#include <unistd.h>
unsigned int sleep(unsigned int seconds);
-Jeff
Koo said:How do you create your own blocking function?
Koo said:How do you create your own blocking function?
Koo
Koo said:Well, all of you examples work but i need something that doesn't use
99% of my cup time. I need something that stop the program and wait
for something to happen. And it needs to be fast!
Koo said:Well, all of you examples work but i need something that doesn't use
99% of my cup time. I need something that stop the program and wait
for something to happen. And it needs to be fast!
Anders Hybertz said:Have a look at www.boost.org and the condition class in the threading
library. It's a non-busy-wait blocking pattern that works very well.
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.