Fix condition variable misuse.
Improve performance on x64 at least.

Maybe can just ignore for 32?  I'm not sure how bad it would be if it read
in between...
Merge pull request #3134 from unknownbrackets/gpu-thread

Improve separate CPU thread performance, fix condition variable misuse