Jonah Williams 3b4c5a2cd6 [Impeller] fix descriptor pool recycler test flake. (flutter/engine#48479)
This test worked by 1) releasing an item to be destructed on a background thead 2) adding a second item to this queue with a waitable event.

The idea being you could wait for the event and that would tell you when 1) was complete. Unfortunately these items are released by being placed into a std::vector, which destroyed in _reverse_ order. Somtimes when the test state was queried the work was done and sometimes it wasn't

To fix this, add a second waitable event that guarantees that both the first event and the original event have finished - because we do not add these event until the first is destructed and we do not add items to the destroy list while it is in progress.
2023-11-29 01:31:39 +00:00
..