]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Make virInitialize thread safe
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 10 Oct 2012 15:11:43 +0000 (16:11 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 16 Oct 2012 15:33:38 +0000 (16:33 +0100)
commitd507f8f9b92918552a528ec6f3443c85bb50c954
tree08e2ac364e29e7b825084cbdeb7f1724a88a685d
parent84912e9c919a7339952daa01806c0fc5ab9fc989
Make virInitialize thread safe

Currently there is a restriction that multi-threaded applications
must manually call virInitialize, before threads start using
libvirt, because it is not thread-safe. By switching it to use
a virOnceControl initializer we gain thread safety, and thus
applications no longer need to manually call it. They can rely
on virConnectOpen invoking it for them.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/libvirt.c