Is there any race condition when multiple threads execute below code ?
class test;
test& get_my_class_instance()
{
static test instance; // static initialisation
return instance;
}
Is static initialisation above guaranteed to be thread safe?
Aucun commentaire:
Enregistrer un commentaire