commit | eaeced3383fc398e657b02452952f1a3db6285a1 | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Tue Mar 03 13:40:49 2020 -0800 |
committer | Andy Hung <hunga@google.com> | Tue Mar 03 14:08:24 2020 -0800 |
tree | 5a2fafa70e9ed853a22de22343d2219a63a45f73 | |
parent | ee47af62071c43d434c6cf06b3974ee89b7ce748 [diff] |
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