Please sign in to comment.
Fix deadlock in starting a Thread
When we create a new Thread object, it is allocated with a the initializion lock locked. This means that any other method can needs to grab this lock has to wait for the thread to be actually started. If a method such as getting a backtrace of the thread is called before the thread is scheduled to be started, it can deadlock because it can't grab the lock and if there is simultanous GC triggered.
- Loading branch information...