mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-15 00:24:19 +00:00
Fixed an issue terminating threads on iOS
This commit is contained in:
parent
7c847e7126
commit
90f3d11ab8
2 changed files with 12 additions and 2 deletions
|
|
@ -167,6 +167,11 @@ Thread* JUCE_CALLTYPE Thread::getCurrentThread()
|
|||
return getCurrentThreadHolder()->value.get();
|
||||
}
|
||||
|
||||
Thread::ThreadID Thread::getThreadId() const noexcept
|
||||
{
|
||||
return threadId.get();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void Thread::signalThreadShouldExit()
|
||||
{
|
||||
|
|
@ -174,6 +179,11 @@ void Thread::signalThreadShouldExit()
|
|||
listeners.call ([] (Listener& l) { l.exitSignalSent(); });
|
||||
}
|
||||
|
||||
bool Thread::threadShouldExit() const
|
||||
{
|
||||
return shouldExit.get() != 0;
|
||||
}
|
||||
|
||||
bool Thread::currentThreadShouldExit()
|
||||
{
|
||||
if (auto* currentThread = getCurrentThread())
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public:
|
|||
|
||||
@see signalThreadShouldExit, currentThreadShouldExit
|
||||
*/
|
||||
bool threadShouldExit() const { return shouldExit.get() != 0; }
|
||||
bool threadShouldExit() const;
|
||||
|
||||
/** Checks whether the current thread has been told to stop running.
|
||||
On the message thread, this will always return false, otherwise
|
||||
|
|
@ -309,7 +309,7 @@ public:
|
|||
thread's not actually running.
|
||||
@see getCurrentThreadId
|
||||
*/
|
||||
ThreadID getThreadId() const noexcept { return threadId.get(); }
|
||||
ThreadID getThreadId() const noexcept;
|
||||
|
||||
/** Returns the name of the thread.
|
||||
This is the name that gets set in the constructor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue