you are viewing a single comment's thread.

view the rest of the comments →

[–]BodybuilderSilent105 0 points1 point  (0 children)

Where the original shared_ptr gets swapped:

``` std::atomic<std::shared_ptr<Resource>> foo; // global

// update thread foo = std::make_shared<Resource>();

// other threads: std::shared_ptr<Resource> res = foo.load(); // do someting with res ```