Commit 7023b6fc authored by Kevin Modzelewski's avatar Kevin Modzelewski

Need to treat this cond_wait as the GIL-acquisition spot it is

Need to 1) show that a thread is waiting, and 2) signal once
we've acquired the GIL.  Basically, what happens in acquireGL().

I feel like this isn't the sort of threading code that should
be written by hand...
parent a552929c
......@@ -460,7 +460,10 @@ void allowGLReadPreemption() {
if (!threads_waiting_on_gil.load(std::memory_order_seq_cst))
return;
threads_waiting_on_gil++;
pthread_cond_wait(&gil_acquired, &gil);
threads_waiting_on_gil--;
pthread_cond_signal(&gil_acquired);
}
}
#elif THREADING_USE_GRWL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment