[vbox-dev] Concurrent Remote Python Sessions

Nikolay Igotti Nikolay.Igotti at Sun.COM
Tue May 25 07:21:57 GMT 2010


    Hi Robert,

 You're welcome. Sure, vboxweb is indeed an opensource project, so feel 
free to post your own patches here.

  Thanks,
    Nikolay


Robert Ramsay пишет:
> Hi Nikolay,
>
> That did the trick! Thank you again for your quick and direct support.
> I'll be sure to include a code snippet with my next VirtualBox issue.
>
> Is the VirtualBox Web Console project being accepting patches? I'd be
> glad to help out withsome of those to-do comments.
>
> Robert
> On Sat, May 22, 2010 at 10:12 AM, Nikolay Igotti <Nikolay.Igotti at sun.com> wrote:
>   
>>  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
>>> vbox-dev at virtualbox.org
>>> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>>>
>>>       
>>     





More information about the vbox-dev mailing list