mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Prevent Thread::sleep waking up on POSIX systems when receiving signals
This commit is contained in:
parent
08b82c796b
commit
fbcd416a84
1 changed files with 1 additions and 4 deletions
|
|
@ -55,10 +55,7 @@ void CriticalSection::exit() const noexcept { pthread_mutex_unlock (&loc
|
|||
//==============================================================================
|
||||
void JUCE_CALLTYPE Thread::sleep (int millisecs)
|
||||
{
|
||||
struct timespec time;
|
||||
time.tv_sec = millisecs / 1000;
|
||||
time.tv_nsec = (millisecs % 1000) * 1000000;
|
||||
nanosleep (&time, nullptr);
|
||||
std::this_thread::sleep_for (std::chrono::milliseconds (millisecs));
|
||||
}
|
||||
|
||||
void JUCE_CALLTYPE Process::terminate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue