Re: [PATCH v2 4/5] In storageVolumeCreateXML, spawn a new thread for volbuilding, in storageVolumeDelete, generate the signal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/18/2011 05:13 AM, Guannan Ren wrote:
Independantly of this, IMHO pthread cancellation handlers are a recipe
for trouble because it is incredibly hard to make sure you correctly
cleanup all resources in the thread, even with use of cleanup handlers.

IMHO, threads should be made to monitor some external "quit" boolean
variable (eg see threadpool.c thread termination).

Daniel
yep but the push and pop function couldn't be in different function,
according to man page as follows.

The concept of pushing and popping handlers isn't the bottleneck here, rather, it is that _all_ functions in the callstack must reliably use the push/pop handlers correctly, before _any_ function can call pthread_cancel on the entire callstack. Right now, none of our code uses any push/pop handlers. Therefore, it becomes a much larger patch to properly insert push/pop handlers into the entire call chain than it is to just write the worker thread to periodically check if any other thread has requested an early quit.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]