Re: libvirt event

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

 



On 08/22/2017 11:27 AM, llilulu wrote:
> libvirt
> version: 3.4.0
>     When use libvirt event in program, if I create more than one thread loop call virEventRunDefaultImp(), Is this invocation correct.

No. We don't expect more than one event loop. Although, if our code is
right (i.e. it locks correctly), it should be possible to have two or
more event loops but I have never tested that and I don't think anybody
else did. On the other hand, why do you need two event loops in the
first place? This usually means poor design.

> If correct ,what happen when event occur.is many thread process event?
>    If I invocation virEventRegisterDefault before any hypervisor connect, and invocation virEventRunDefaultImp.Then I connect a hypervisor(qemu) and register some event on this connection. I connect another hypervisor(lxc), before lxc connection, I reinvocation virEventRegisterDefault and virEventRunDefaultImp, Is this operate correct?What happen after that?

Again, why do you want to run two event loops?

Michal

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux