On an Intel Iris Xe (ANV, Mesa 26.2.6) beside the runtime suite, 20 of 8,655 releases of a render
or compute state whose pool piece was still running took 16 to 32 ms: the release started the
device's reaper thread on the releasing thread, and in the 8 runs timed by part the thread start
took all of it but 0.1 ms, the releasing thread asleep (one voluntary switch). Metal's release
never blocks, and teardown_threads' release bound failed there (12 of 4,530 and 8 of 4,125 loaded
runs).
The release now only notes the device's reaper (an Arc) in the state's holds; the first piece that
gives back after the release starts the reaper's thread, on the pool's thread and outside the
holds' lock, and hands it what it gave back. Where no thread can be started the piece lets go of it
itself, as before. The reaper's thread still starts at the default class (exit_guard::spawn).
Test: piece_holds' release-while-a-piece-runs test asserts the release started no thread and the
piece did. Iris A/B under load: see the land commit.
(Fix written by exitcrash on steelbrain/iris-flakes-wip 78fcea640e, unrun there.)
(cherry picked from commit b6aa117ac559d7b819d885f200d54a66424df61b)