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 );
250 bool SetAffinity(
const Array<int>& processors );
276 bool SetAffinity(
int processor );
295 bool IsActive()
const;
300 priority Priority()
const;
305 void SetPriority( priority );
313 SetPriority( ThreadPriority::Inherit );
342 bool Wait(
unsigned ms );
348 void Sleep(
unsigned ms );
369 static bool IsRootThread();
378 static int NumberOfRunningThreads();
437 bool TryGetStatus(
uint32& status )
const;
453 void SetStatus(
uint32 status );
478 SetStatus( 0x80000000 );
495 return (Status() & 0x80000000) != 0;
512 return TryGetStatus( status ) && (status & 0x80000000) != 0;
529 String ConsoleOutputText()
const;
540 return !ConsoleOutputText().IsEmpty();
549 void ClearConsoleOutputText();
563 void FlushConsoleOutputText();
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;
744 void PCL_FUNC
Sleep(
unsigned ms );
750 #endif // __PCL_Thread_h