Thursday, July 30, 2009

thread

  • single-Threaded Processes -

Single-threaded apartments consist of exactly one thread, so all COM objects that live in a single-threaded apartment can receive method calls only from the one thread that belongs to that apartment. All method calls to a COM object in a single-threaded apartment are synchronized with the windows message queue for the single-threaded apartment's thread. A process with a single thread of execution is simply a special case of this model.

  • Multi-Threaded Processes -

„ Each thread has a private stack

„ But threads share the process address space!

„ There’s no memory protection!

„ Threads could potentially write into each other’s stack

No comments:

Post a Comment