11
▼
Rating:
This post has not been rated yet. Be the first to give a rating!
Impact:
This post has a impact factor of 11 and 422 pageviews
Alternative to double-checked locking and the Singleton pattern
Singleton pattern is a well-known pattern in programming. Double-checked locking is an implementation of singleton pattern which is intended to be thread-safe. However it is found that this method is broken, unless memory barrier is used which may has problem of portability.
In this article, I am going to present an alternative to double-checked locking ...