INTERACT FORUM

Windows => Plug-in Development => Topic started by: salsbst1 on April 07, 2004, 07:49:42 am

Title: threading model of MJAutomation?
Post by: salsbst1 on April 07, 2004, 07:49:42 am
My client is multithreaded, so I need to know the threading model of the automation server.  Apartment?  Free?  Both?  
Title: Re:threading model of MJAutomation?
Post by: salsbst1 on April 07, 2004, 12:36:51 pm
After some testing with slow websites and the MJInternetAutomation object, it appears that MJ is queuing all calls into the Automation interface (i.e. that MC isn't going to do two things at once for me).  That said, I still need to access it from multiple threads, so my question about its thread model still stands.

?
Title: Re:threading model of MJAutomation?
Post by: salsbst1 on June 01, 2004, 07:16:14 pm
bump.... still having trouble here.
Title: Re:threading model of MJAutomation?
Post by: Zoner on July 06, 2004, 12:53:50 pm
I would also like to know the answer to this one.  Since I wasn't sure about it, I am queueing data between threads to ensure that only one thread ever calls into MC.  It would be nice to know if this is needed or not.
Title: Re:threading model of MJAutomation?
Post by: Matt on July 06, 2004, 01:33:26 pm
MC uses apartment threading.

As long as each thread creates its instance of the automation object, it's safe to use them at the same time. (although MC will only do one thing at a time)

Creating an object in one thread an passing it to another thread may cause problems.
Title: Re:threading model of MJAutomation?
Post by: Zoner on July 07, 2004, 03:37:59 am
Thanks, Matt!