> [stuff cutted] > > > > It looks like we have the following choices: > > > > 1. Not support read-only thread safety. > > 2. Support read-only thread safety at the sacrifice of leaking memory and > > limiting implementation memory models (current IDOM). > > 3. Support read-only thread safety as you suggest by performing thread safe > > increments and decrements with the possibility that some performance is > > lost. > > > > If #3 does affect performance, then perhaps read-only thread safety can be > > made an option so that those that don't need it don't pay for it. > > The #3 probably has negligable affect on performance as long as there are > support in the platform hardware for atomic operations like test and set. > Most processors do have this support and it is also often directly supported > by the operating system. But making it optional with a compiler flag is not > that hard either.
My experience has been the opposite of yours. Synchronization is a performance killer, especially in a multi-threaded, SMP environment. Don't kill the new IDOM by saddling it with bad performance characteristics to satisfy thread-safe reference counting. This is the main reason I'm opposed to the reference-counted model. It's intrusive, and those who don't benefit from it are still forced to pay the price, which is contrary to the entire philosphy of the C++ language. I'm not even interested in the paying the price for integer increments and decrements, which certainly are not free. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
