F.27: Example fix

It is usually a bad idea to share mutable objects between threads, which leads to a race condition or unnecessary thread contention.,
pull/409/head
Andriy Grygorenko 10 years ago
parent 105ff97910
commit 5990abead1

@ -2583,7 +2583,7 @@ Using `std::shared_ptr` is the standard way to represent shared ownership. That
##### Example
shared_ptr<Image> im { read_image(somewhere) };
shared_ptr<const Image> im { read_image(somewhere) };
std::thread t0 {shade, args0, top_left, im};
std::thread t1 {shade, args1, top_right, im};

Loading…
Cancel
Save