31bool Thread::createNativeThread (Priority)
33 PosixThreadAttribute attr { threadStackSize };
34 PosixSchedulerPriority::getNativeSchedulerAndPriority (realtimeOptions, {}).apply (attr);
36 threadId = threadHandle = makeThreadHandle (attr,
this, [] (
void* userData) ->
void*
40 juce_threadEntryPoint (
myself);
45 return threadId !=
nullptr;
48void Thread::killThread()
50 if (threadHandle !=
nullptr)
74static bool swapUserAndEffectiveUser()
static void JUCE_CALLTYPE raisePrivilege()
Raises the current process's privilege level.
static void JUCE_CALLTYPE setPriority(ProcessPriority priority)
Changes the current process's priority.
static void JUCE_CALLTYPE lowerPrivilege()
Lowers the current process's privilege level.
ThreadID getThreadId() const noexcept
Returns the ID of this thread.
Priority getPriority() const
Returns the current priority of this thread.
bool setPriority(Priority newPriority)
Attempts to set the priority for this thread.
Thread(const String &threadName, size_t threadStackSize=osDefaultStackSize)
Creates a thread.
static ThreadID JUCE_CALLTYPE getCurrentThreadId()
Returns an id that identifies the caller thread.
Priority
The different runtime priorities of non-realtime threads.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...