
On Thu, Nov 15, 2007 at 11:28:35AM -0700, Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1195154883 28800 # Node ID ecc46606e90388217b94916c1eab2ceeb051064a # Parent 670294145fcc1a786594f5110e2248cd4ec0b7ed Initialize libvirt early so that we avoid the backend register race
Yup, if you don't call Initialize() first multiple parallel connect operations may race trying to do the initialization simultaneously. We actually have locks in libvirt (or rather we reuse the ones from libxml2) so we could try to do some locking in Initialize, but I really prefer a model where the init is clearly separated. Looks fine to me even if I don't understand the details of how that patch works. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/