C++ and the Perils of Double-Checked Locking

 

 

Much effort has been put into addressing this shortcoming. One of the most popular approaches is a design pattern in its own right, the Double-Checked Locking Pattern (DCLP) [13, 14]. DCLP is designed to add efficient thread-safety to initialization of a shared resource (such as a Singleton), but it has a problem: it’s not reliable. Furthermore, there’s virtually no portable way to make it reliable in C++ (or in C) without substantively modifying the conventional pattern implementation. To make matters even more interesting, DCLP can fail for different reasons on uniprocessor and multiprocessor architectures. [via]
http://www.aristeia.com/Papers/DDJ_Jul_Aug_20...

Rating: 0/10

 

 

Tags: Tag c language, Tag dclp, ...

 

Related Files

 

 
Sponsored Links
Free Download Antares Manual, Guide, Instructions, available in PDF ebooks format.
C++ and the Perils of Double-Checked Locking

Rate this Document

ADS