mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
Add setaffinity method to thread implementation and interface class
This commit is contained in:
@@ -135,6 +135,11 @@ public:
|
||||
/// Typically, the real stack size is rounded up to the nearest
|
||||
/// page size multiple.
|
||||
|
||||
void setAffinity(unsigned int cpu);
|
||||
/// Limit specified thread to run only on the processors "cpu"
|
||||
/// cpu - processor (core) number
|
||||
/// Method would Throw SystemException if affinity did not setted
|
||||
|
||||
int getStackSize() const;
|
||||
/// Returns the thread's stack size in bytes.
|
||||
/// If the default stack size is used, 0 is returned.
|
||||
@@ -350,6 +355,9 @@ inline void Thread::setStackSize(int size)
|
||||
setStackSizeImpl(size);
|
||||
}
|
||||
|
||||
inline void Thread::setAffinity(unsigned int cpu) {
|
||||
setAffinityImpl(cpu);
|
||||
}
|
||||
|
||||
inline int Thread::getStackSize() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user