Overhead of synchronized class used in unshared situation

breezes Wangyuanzju at gmail.com
Sun Nov 27 05:53:49 PST 2011


I have several cumtermized data structures which will be used both in shared and unshared situations. Because un-synchronized classes can not be used in shared situation, I think i have to
define these classes as synchronized classes, because otherwise i will have to write the same class twice. However, if those classes are used in unshared situations, such as local variable or
unshared global variable, does the overhead of synchronized still remain? I'm writing database in which performance is critical.


More information about the Digitalmars-d-learn mailing list