virThread: why no return values permitted in thread API?

Claudio Fontana cfontana at suse.de
Wed Apr 20 12:24:39 UTC 2022


Hi,

I noticed that in the virThread API return values from threads are explicitly excluded from the API.

The "virThreadHelper" sits in the middle between the caller of virThreadCreate and pthread, making it impossible to return a value from the thread,
to check after joining the thread.

I'd need to know if the thread execution is successful or not then I join the thread,
so what is the reason for this choice?

Should I use pthread directly instead?

Thanks,

Claudio

-- 
Claudio Fontana
Engineering Manager Virtualization, SUSE Labs Core

SUSE Software Solutions Italy Srl



More information about the libvir-list mailing list