Hello every one, i have a problem with plugins :
I am programming a server that accepets tp connections, for each incomming connection, the server generates a new thread.
Each thread has to load the same physical plugin (libAuthcomPassword.so is the name of the file )
The idea is that each thread create a different instance of the plugin
In each thread, i load the plugin with this command
<code> QPluginLoader loader (directory );
QZPlugInterface* authenticatorIfc = qobject_cast< QZPlugInterface*> ( loader.instance() )
</code>
Debugging the program i noticed that the instance 'authenticatorIfc' has the same address in every thread (thus the same instance) so the program crashes (becasuse different threads tries to execute the same instance of the object )
How can i load the same physical plugin, but different instaces ?
Thank you very much
PD: sorry my bad english :$


Reply With Quote



Bookmarks