Skip to content
Commit eaeced33 authored by Andy Hung's avatar Andy Hung
Browse files

SoundPool: Fix StreamManager JavaThread shutdown

std::future destructor only blocks for ready when created by std::async,
so do a wait in the JavaThread destructor.

Do not signal that the thread is closed until we really are finished
with all member variable access.

This fixes a rare race condition.

Test: SoundPool stress test
Test: SoundPoolAacTest SoundPoolHapticTest SoundPoolMidiTest SoundPoolOggTest
Bug: 150517918
Change-Id: I412143726956ee100069f711dd39b1d59ac100b0
parent ee47af62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment