mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[dxvk] Add DxvkEvent::wait method
This commit is contained in:
parent
336b3858c9
commit
0fd8019a70
@ -26,5 +26,11 @@ namespace dxvk {
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
return m_status;
|
||||
}
|
||||
|
||||
|
||||
void DxvkEvent::wait() {
|
||||
while (this->getStatus() != DxvkEventStatus::Signaled)
|
||||
dxvk::this_thread::yield();
|
||||
}
|
||||
|
||||
}
|
@ -46,6 +46,15 @@ namespace dxvk {
|
||||
*/
|
||||
DxvkEventStatus getStatus();
|
||||
|
||||
/**
|
||||
* \brief Waits for event to get signaled
|
||||
*
|
||||
* Blocks the calling thread until another
|
||||
* thread calls \ref signal for the current
|
||||
* revision of the event.
|
||||
*/
|
||||
void wait();
|
||||
|
||||
private:
|
||||
|
||||
std::mutex m_mutex;
|
||||
|
Loading…
Reference in New Issue
Block a user