Fix PrioritizedSerialExecutor.

It was possible that fetchNextTasks() would be called by multiple
threads concurrently.
If it happens, some tasks in the task queues might be ignored.

cherrypick of Idc81c43c45e382da3850cc55b9a42c281548d2a8

bug: 10957075
Change-Id: I41bf90dda15306ee879350f96a791d940ea31da1
4 files changed
tree: 77f2ddf49d14d458dc9f9e726ec14381204109df
  1. dictionaries/
  2. java/
  3. native/
  4. tests/
  5. tools/
  6. Android.mk
  7. CleanSpec.mk