Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Sunday, January 27, 2013

STA and MTA

This post is written because when I wrote the multithreads application, mostly in UI contained apps, it will ask for using STA in some methods. Then, I really curious what it is and find out why need to use STA, and how about MTA. In short, STA and MTA indicates where the thread resources will be located. If some objects need like COM objects, they are not thread safe which don't handle thread synchronization, commonly used in UI compoment. To call COM objects in other threads, they need to marshal message to the STA thread using message pumping system.

References:

No comments:

Post a Comment