cutelyst / Virtlyst

Web interface to manage virtual machines with libvirt
GNU Affero General Public License v3.0
219 stars 42 forks source link

QtConcurrent #35

Closed haralambop closed 8 months ago

haralambop commented 5 years ago

Hi I am trying to connect to remote libvirtd instances using QtConcurrent I replaced in the updateConnections the line server->conn = new Connection(url, name, server); with future[i++] = QtConcurrent::run(connect_func, server,url,name,id); but i receive an error QObject: Cannot create children for a parent that is in a different thread.

My question is: How can I correct use the QtConcurrent in cutelyst?

dantti commented 5 years ago

You can use QtConcurrent as long as what you are using is thread-safe, and virtlyst classes aren't.