13.07.2015 Views

Multithreading - Poco

Multithreading - Poco

Multithreading - Poco

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Working With Threads (cont'd)> Check whether a thread is running by calling isRunning().> A pointer to the Thread object for the current thread can beobtained with the static current() member function.The main thread does not have a Thread object, thereforecurrent() returns a null pointer for the main thread.> void Thread::sleep(long milliseconds)suspends the current thread for the specified amount of time.> void Thread::yield()gives the CPU to another thread.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!