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

[libvirt] PATCH 0/5: connection cloning support (WIP)



This series is a work-in-progress set of patches implementing connection
cloning. The idea is that if you want to use a connection form multiple
threads, you could do

   virConnectPtr copy = virConnectClone(conn)

and use 'copy' from the other thread. This avoids the problem of having
to make all the virError handling stuff thread-local whic is the blocker
for allowing real mutlti-thread access to a single virConnectPtr object.

I believe this cloning support should be sufficient for the Java bindings
need to use a thread for its event loop. The idea being that if you wanted
to use an event loop in a background thread, you'd create a cloned object
for use event loop triggered callbacks like domain events notifications.

I'd still like to do some experiments later making the single virConnectPtr
fully thread safe, but that'll take a little more time. I'm hoping this
cloning will address the Java needs right now...

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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