Robert,

As an example of multithreaded Python app using VBox API please refer to vboxweb - http://code.google.com/p/vboxweb/source/browse/trunk/VBoxWebSrv.py

What you likely need, is pythoncom.CoMarshalInterThreadInterfaceInStream magic (and calling mgr.initPerThread() in new thread start routine ). Usually, it makes sense to post minimal code snippets when asking questions like this.

Thanks,
Nikolay

Robert Ramsay пишет:
To Nikolay and all VirtualBox developers:

Thanks for a great 3.2 release! The python API has been updated and
fixed my previous error. But now I have a new issue. I can't seem to
make concurrent "session's" with python. When two different python
scripts try to use openExistingSession in the same thread it works
fine. But If I use openExistingSession in two different threads or if
I use a session object in a new thread it gives the COM error:
(-2147417842, 'The Application called an interface that was marshalled
for a different thread.'). And If I try to create a VirtualBoxManager
in two different threads I get infinitely recursive COM get_name
loops. The documentation says that openExistingSession should allow
multiple sessions. I was able to do use threading with indifference to
the session objects using the 3.1.6 SDK/API.

Thanks,
Robert

_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev


_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev

Reply via email to