Fix race condition in thread pool shutdown

We were not holding the task queue lock when we did broadcast, causing
a race where a thread waits on the CV after the broadcast.

Fixes dex2oat deadlocking.

Change-Id: I84f30020511c2bd43f71d9b7b392720bd8d03eab
2 files changed
tree: ffd976fbc1195cddbb956f87a73d423d611b3cf9
  1. build/
  2. jdwpspy/
  3. src/
  4. test/
  5. tools/
  6. .gitignore
  7. Android.mk