O'Reilly logo

Applying COM+ by Gregory Brill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. COM+ Synchronization Through Activities

Writing a thread-safe component—that is, one that can safely be called by multiple threads at any time—has always been a challenge. Such development demands knowledge of semaphores, mutexes, critical sections, and other forms of OS thread locking primitives. These must be set like sentinels at the gates of every resource in a process that requires serialized access.

COM offers protection for objects that might be called concurrently by multiple threads, but cannot or do not employ any form of mutual exclusion primitive (mutex, semaphores, and so on). This protection comes in the form of the Single-Threaded Apartment (STA), which, as discussed in Chapter 4, "Threading and Apartment Models," serializes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required