mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 06:41:15 -03:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user