зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312086 - part 1 - pull the TimeStamp'd ConditionVariable::wait_for into platform-independent code; r=fitzgen
The implementation is exactly the same for both the Windows and Posix implementations. There's no need for the code duplication.
This commit is contained in:
Родитель
6fac28059f
Коммит
524aedff8e
|
@ -63,7 +63,9 @@ public:
|
|||
// independent of system clock changes. While insulated from clock changes,
|
||||
// this API is succeptible to the issues discussed above wait_for.
|
||||
CVStatus wait_until(UniqueLock<Mutex>& lock,
|
||||
const mozilla::TimeStamp& abs_time);
|
||||
const mozilla::TimeStamp& abs_time) {
|
||||
return wait_for(lock, abs_time - mozilla::TimeStamp::Now());
|
||||
}
|
||||
|
||||
// As with |wait_until|, block the current thread of execution until woken
|
||||
// from another thread, or the given absolute time is reached. This method
|
||||
|
|
|
@ -119,13 +119,6 @@ js::ConditionVariable::wait(UniqueLock<Mutex>& lock)
|
|||
MOZ_RELEASE_ASSERT(r == 0);
|
||||
}
|
||||
|
||||
js::CVStatus
|
||||
js::ConditionVariable::wait_until(UniqueLock<Mutex>& lock,
|
||||
const TimeStamp& abs_time)
|
||||
{
|
||||
return wait_for(lock, abs_time - TimeStamp::Now());
|
||||
}
|
||||
|
||||
js::CVStatus
|
||||
js::ConditionVariable::wait_for(UniqueLock<Mutex>& lock,
|
||||
const TimeDuration& a_rel_time)
|
||||
|
|
|
@ -59,13 +59,6 @@ js::ConditionVariable::wait(UniqueLock<Mutex>& lock)
|
|||
MOZ_RELEASE_ASSERT(r);
|
||||
}
|
||||
|
||||
js::CVStatus
|
||||
js::ConditionVariable::wait_until(UniqueLock<Mutex>& lock,
|
||||
const mozilla::TimeStamp& abs_time)
|
||||
{
|
||||
return wait_for(lock, abs_time - mozilla::TimeStamp::Now());
|
||||
}
|
||||
|
||||
js::CVStatus
|
||||
js::ConditionVariable::wait_for(UniqueLock<Mutex>& lock,
|
||||
const mozilla::TimeDuration& rel_time)
|
||||
|
|
Загрузка…
Ссылка в новой задаче