-
- Downloads
scheduled_executor: Fix deadlock
If the scheduler's has a job that owns the last reference to the scheduler itself, then the thread will try to join itself in the destructor of the scheduler, resulting in `std::terminate()`. Thus, detach the thread if the scheduler is freed from its thread, because nobody is supposed to have a reference to the thread. This introduces a read after free of `running_`. By making it a shared value, the thread can keep a reference after destruction of the scheduler. Gitlab: #545 Change-Id: I0118c99a5718d302f916099e24606add444546d8
Please register or sign in to comment