|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ReaderWriterLockI use ReaderWriterLock to protect the internal state of a class instance from
multi-threaded access, should it be declared as private member or static member of the class? If different instances of the class don't depend on each other's internal
state, create it as a private member of the class. If the different instances do depend on each other's internal state (I'd hate to debug this configuration), create it as a static member. Mike Ober. Show quote "Roy" <R**@discussions.microsoft.com> wrote in message news:B15588F6-41E9-40C0-AB2A-B5E9D998C9C6@microsoft.com... >I use ReaderWriterLock to protect the internal state of a class instance >from > multi-threaded access, should it be declared as private member or static > member of the class? |
|||||||||||||||||||||||