correct threading around clearing the viewer sequences
This commit is contained in:
@@ -273,6 +273,22 @@ void RenderThread::cancel() {
|
||||
wait();
|
||||
}
|
||||
|
||||
void RenderThread::wait_until_paused()
|
||||
{
|
||||
|
||||
// Wait for thread to finish whatever it's doing before proceeding.
|
||||
//
|
||||
// FIXME: This is slow. Perhaps there's a better way...
|
||||
|
||||
if (wait_lock_.tryLock()) {
|
||||
wait_lock_.unlock();
|
||||
return;
|
||||
} else {
|
||||
wait_lock_.lock();
|
||||
wait_lock_.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
void RenderThread::delete_buffers() {
|
||||
front_buffer_1.Destroy();
|
||||
front_buffer_2.Destroy();
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
int idivider = 0);
|
||||
bool did_texture_fail();
|
||||
void cancel();
|
||||
|
||||
void wait_until_paused();
|
||||
|
||||
public slots:
|
||||
// cleanup functions
|
||||
|
||||
Reference in New Issue
Block a user