52 #ifndef __PCL_Thread_h
53 #define __PCL_Thread_h
99 namespace ThreadPriority
136 using priority = ThreadPriority::value_type;
203 void Start( priority = ThreadPriority::Inherit,
int processor = -1 );
313 SetPriority( ThreadPriority::Inherit );
478 SetStatus( 0x80000000 );
495 return (Status() & 0x80000000) != 0;
512 return TryGetStatus( status ) && (status & 0x80000000) != 0;
540 return !ConsoleOutputText().IsEmpty();
677 int maxThreads = PCL_MAX_PROCESSORS );
714 int maxThreads = PCL_MAX_PROCESSORS );
717 int m_processorIndex = -1;
723 void* CloneHandle()
const override;
727 virtual bool IsStealth()
const
732 friend class ThreadDispatcher;
Client-side interface to a PixInsight thread.
String ConsoleOutputText() const
static Array< size_type > OptimalThreadLoadsAligned(size_type count, int align=16, size_type overheadLimit=1u, int maxThreads=PCL_MAX_PROCESSORS)
static int NumberOfThreads(size_type count, size_type overheadLimit=1u)
bool TryIsAborted() const
void SetPriority(priority)
bool TryGetStatus(uint32 &status) const
void FlushConsoleOutputText()
void ClearConsoleOutputText()
void EnsureUnique() override
Array< int > Affinity() const
void Start(priority=ThreadPriority::Inherit, int processor=-1)
void SetStatus(uint32 status)
static bool IsRootThread()
priority Priority() const
bool HasConsoleOutputText() const
bool SetAffinity(int processor)
static int NumberOfRunningThreads()
static Array< size_type > OptimalThreadLoads(size_type count, size_type overheadLimit=1u, int maxThreads=PCL_MAX_PROCESSORS)
bool SetAffinity(const Array< int > &processors)
Root base class for all user interface objects.
void PCL_FUNC Sleep(unsigned ms)