On 01/15/2018 11:57 AM, Daniel P. Berrange wrote:
On Mon, Jan 15, 2018 at 05:51:28PM +0100, Erik Skultety wrote:
> On Wed, Jan 10, 2018 at 12:23:29PM -0500, John Ferlan wrote:
>> Split up virThreadPoolFree to create a Drain function which will
>> be called from virNetServerClose in order to ensure the various
>> worker threads are removed during the close rather than waiting
>> for the dispose function.
>>
>> Signed-off-by: John Ferlan <jferlan(a)redhat.com>
>> ---
>
> I think that Dan had a bit different idea about the virThreadPoolDrain (I think
> that the name should have been something like virThreadPoolJobsPurge) function.
>
https://www.redhat.com/archives/libvir-list/2017-December/msg00802.html
Yep, this impl in John's patch is more akin to a StopWorkers()
method, than a Drain() method. To me "Drain" implies the workers
are still available to process further jobs
Regards,
Daniel
OK - right... there's so many links and thoughts with various
terminology in the former series... I of course read one path about
splitting up PoolFree and just ran with that, but had the more recent
stuff in the front of the brain so the Drain name stuck, but the concept
of Drain certainly wasn't what Dan described.
Let's see what I can come up with for a Drain function. Still trying to
wrap my head around the totality of this code - so many nooks and
crannies. Still not 100% clear how to handle the what happens if some
worker/job is truly stuck and the TERM is attempted.
John