Threading: Neutral Apartments

COM+ introduces a new threading model called neutral apartments to simplify programming in multithreaded environments. Neutral apartments are the preferred model for components with no user interface. In the past, to prevent bottlenecks and to maintain server scalability, COM developers were forced to implement free-threaded components. However, free-threading models were complicated to implement because they must deal with synchronized access. In neutral apartments, objects follow the guidelines for multithreaded apartments but can execute on any kind of thread. Future versions of Visual Basic will allow the use of neutral apartments, which, for the first time, will allow components built with it to be pooled.

Get Sams Teach Yourself Microsoft® Windows® DNA Programming in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.