Multithreading
Multithreading
Doing things in parallel with POCO.
Overview
>
>
>
>
>
>
The Thread class
Thread pools
Thread Local Storage
Thread Error Handling
Synchronization
(Mutex, FastMutex, Event, Condition, Semaphore, RWLock)
Higher-level abstractions
(Timers, Active Objects, Tasks and Task Management)
The Thread Class
>
>
>
Poco::Thread represents a thread in POCO.
#include "Poco/Thread.h"
In POCO, a thread has
>
>
>
>
an optional name
a priority (Thread::Priority)
a unique ID (integer)
Poco::Runnable provides an entry point for a thread.
Thread Priorities
>
POCO supports five distinct priority values for a thread. These are
mapped to the operating system's thread priority values.
>
>
>
>
>
>
PRIO_LOWEST
PRIO_LOW
PRIO_NORMAL (default)
PRIO_HIGH
PRIO_HIGHEST
Some platforms require special privileges (root) to set or change
a thread's priority.
Thread Priorities (cont'd)
>
>
>
The five log levels supported by POCO might not be fine grained
enough for some applications.
You can set an operating system specific thread priority with
void setOSPriority(int prio)
You can use int getMinOSPriority() and int getMaxOSPriority() to
find out the range of valid priority values.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- lecture 4 thread implementation
- multithreading
- connected components workbench software guide for
- process and thread scheduling
- shared memory programming with pthreads
- introduction to mulrithreaded programming in embedded
- operating systems sample exam questions and answers
- 12 multithreading and gui programming
- processes and threads
- the design and implementation of the reactor an object