On Thu, Oct 28, 2021 at 12:39:03PM +0100, Richard W.M. Jones wrote: > On Wed, Oct 27, 2021 at 07:42:31PM +0200, Laszlo Ersek wrote: > > (4) This could be slightly optimized by restricting the condvar signal > > to "queue size is now exactly 1 (i.e., it was empty)". > > I think there's a possible race with that, but let me think about it.
Yes - the race is that the worker thread hasn't started up yet / hasn't reached the first point where it's waiting on the condition. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
