Multithreading in Daz SDK?
shoei321
Posts: 113
I'm trying to employ some basic concurrency in a Daz plugin I'm working on and am encountering significant problems at every step.
Is there any reason I should be aware of that would prevent me from using things like QThreadPool or QtConcurrent in the Daz SDK? Outside of rendering Daz only ever seems to make use of a single core on my system, but Qt has good support for multi threading and I'm hoping to take advantage of this.
Thanks
Comments
Disregard this -- I found my issue and it had nothing to do with Daz. I was misunderstanding how the threading support in Qt works.
a little late to the party: afaik nothing in the daz api is really thread-safe; means accessing dz* (scene, nodes, mats, etc.) from different threads may easily cause problems. i.e. in my case trying to access geometry data from multiple threads caused inconsistent data.
problems and crashes that may occur because of this are often not very obvious; from my experience it is advised to do any call to any dz* object from the main thread only,. e.g. just do completely encapsulated calculations or atomic operations from within other threads...