[omniORB] Single Threaded Policy: really same thread?

JHJE (Jan Holst Jensen) jhje@novonordisk.com
Wed Dec 18 10:33:02 2002


> apartment. This is required to preserver apartment contexts. Look into
> the reason for the threading style "both", which allows 
> single threaded
> apartments to create components as single threaded and multi threaded
> apartments to create them multi threaded, but it does not stop the
> thread switches. 

OK, thanks for clearing this up. But if object A and B are both
free-threaded surely there is no thread switching when A calls B ? Or did I
miss something (may easily happen when talking about COM threading :-) ) ?

> IMHO, people who "don't have to think about thread safety" should not
> really be using multiple threads. It is to dangerous and 
> confusing of a
> topic that most experienced programmers don't fully understand, and
> trying to make it "easy" for them is somewhat crazy.

I completely agree, but when people use third-party components they may use
multi-threaded components without knowing it. So protection against
multi-threading issues is per se a good thing.

> Not only is the concept confusing, it is slowing everything 
> down! To me
> this is ludicrous!

Yeah. Should have been done otherwise, and if you could only switch it
off...

-- Jan