Fix intermittent crash in iothread.cpp

The wrong lock was being taken around the result queue, leading to the
occasional crash when processing interactive input. This didn't seem to
really affect normal day-to-day usage, but it did sometimes cause the
interactive tests to crash.

Fixes #1692.
This commit is contained in:
Kevin Ballard 2014-09-19 17:00:29 -07:00
parent 51c2005ea2
commit 761be8ab7f

View file

@ -332,7 +332,7 @@ static void iothread_service_result_queue()
// Move the queue to a local variable
std::queue<SpawnRequest_t *> result_queue;
{
scoped_lock queue_lock(s_main_thread_request_queue_lock);
scoped_lock queue_lock(s_result_queue_lock);
std::swap(result_queue, s_result_queue);
}