What happens if two COM classes each without a threading model are implemented in one in-proc COM se
Posted
by sharptooth
on Stack Overflow
See other posts from Stack Overflow
or by sharptooth
Published on 2010-03-29T09:45:49Z
Indexed on
2010/03/29
13:13 UTC
Read the original article
Hit count: 473
Consider a situation. I have an in-proc COM server that contains two COM classes. Both classes are marked as "no threading model" in the registry - the "ThreadingModel" value is just absent. Both classes read/write the same set of global variable without any synchronization.
As far as I know "no threading model" will enforce COM to disallow concurrent access to the same or different instances of the same class by different threads.
Will COM prevent concurrent access to instances of the two abovementioned different classes? Do I need synchronization when accessing the global variables from two different COM classes in this situation?
© Stack Overflow or respective owner