HomePhabricator

[lldb] Fixed race conditions on private state thread exit

Description

[lldb] Fixed race conditions on private state thread exit

This patch fixes various races between the time the private state thread is signaled to exit and the time it actually exits (during which it no longer responds to events). Previously, this was consistently causing 2-second timeout delays on process detach/stop for us.

This also prevents crashes that were caused by the thread controlling its own owning pointer while the controller was using it (copying the thread wrapper is not enough to mitigate this, since the internal thread object was getting reset anyway). Again, we were seeing this consistently.

Differential Revision: http://reviews.llvm.org/D21296

Details

Committed
cameron314Jun 14 2016, 9:22 AM
Differential Revision
D21296: [lldb] Fixed race condition on private state thread exit, take 2
Branches
Unknown
Tags
Unknown