|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Steve Johnson (sjohnson_at_3TSYSTEMS.COM)
Date: Thu Jan 16 2003 - 08:12:11 CST
> In this respect I don't understand why the CComSingleThread
> is even a choice, since you never know what a clients threading
> model is.
The client's threading model is irrelevant. If a COM server supports
multi-threaded access, it should mark it's threading model as 'FREE'
in the registry. In this case, the COM runtime activates the server
in the process MTA, and any thread in the MTA may freely access it.
Any thread in an STA or in a different process may only access the
server through a proxy. If a COM server does not support
multi-threaded access, it should mark it's threading model as
'APARTMENT' in the registry. In this case, the COM runtime activates
the server in a STA and the only way to access the server from
multiple threads is via proxies, in which case, synchronization is
provided by the COM runtime because it only allows a single causality
to execute within the apartment at any given time.
If you don't need multi-threaded access, the single threading model in
ATL would be desirable because it is more lightweight.
-- Steve Johnson 3t Systems---------------------------------------------------------------- Users Guide http://discuss.microsoft.com/archives/mailfaq.asp contains important info. Save time, search the archives at http://discuss.microsoft.com/archives/index.html . To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
DISCUSS.MICROSOFT.COM