The header says the host's pool_remove is not called once
rvg_graphics_device_release has begun, but the release closed the
windows before it closed the pool, and until then the pool's thread went
on placing and removing pieces: a pool_add or pool_remove could begin
after the release had begun.
The release now closes the pool first. What changes for the host: the
pool's callbacks stop at the release's start instead of after its
windows closed. A pool_add or pool_remove the pool's thread began before
that may still be running, and the release waits for it, as it did.
QEMU's side needs no change: its teardown closes its side of the pool
before it calls the release, and its callbacks drop any ask made after.
The test holds the pool's thread inside the host's pool_add as the
release begins, and checks that the add ends before the window closes.