Amazon Interview Question
Software Engineer / Developers//Use double-check pattern with a bool member variable to make it thread safe
Instance *getInstance(){
if ( available ){
pthread_lock(mtx);
if ( available ){
_instance = new Singleton();
available = true;
}
}
}
Hey is the recruitment going on for freshers in india???
- megha September 08, 2009