Re: [PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-10 Thread Nicolas Saenz Julienne
On Thu, 2022-03-10 at 09:20 +, Stefan Hajnoczi wrote: > On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote: > > Upon freeing a thread pool we need to get rid of any remaining worker. > > This is achieved by setting the thread pool's topping flag, waking the > > s/topping/st

Re: [PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-10 Thread Stefan Hajnoczi
On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote: > Upon freeing a thread pool we need to get rid of any remaining worker. > This is achieved by setting the thread pool's topping flag, waking the s/topping/stopping/ > workers up, and waiting for them to exit one by one. The

[PATCH v2 1/4] util/thread-pool: Fix thread pool freeing locking

2022-03-03 Thread Nicolas Saenz Julienne
Upon freeing a thread pool we need to get rid of any remaining worker. This is achieved by setting the thread pool's topping flag, waking the workers up, and waiting for them to exit one by one. The problem is that currently all this process happens with the thread pool lock held, effectively block