In the "Singleton with double-checked locking pattern" example of the above boost examples, are the memory_order_consume for the second load of _instance and the memory_order_release for the store of _instance necessary? I thought the scoped_lock has acquire and release semantics already and the first load of _instance has synchronization mode memory_order_consume.
Aucun commentaire:
Enregistrer un commentaire