On Fri Aug 4 19:58:51 2023 +0000, Zebediah Figura wrote:
Not sure why I wasn't added as reviewer, but this looks wrong, and I think this doesn't fully solve the problem, either. As far as I can tell, if there's something else [what?] that pushes to the queue executing concurrently with Shutdown(), it'll end up pushing to an invalid queue handle after Shutdown() returns. This was already the case, but now it's worse, because you can't just fix it by setting source->async_commands_queue to NULL.
1. You were added as reviewer. 2. It doesn't matter much if the handle is invalid, as the PutWorkItem call will just fail.