Skip to content

Commit bbd5e76

Browse files
author
Oguzhan Katli
committed
smart pointer section update
1 parent dcc3dd4 commit bbd5e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/2-SmartPointer/shared_pointer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace sharedpointer {
9494
<< "thread: [" << std::this_thread::get_id()
9595
<< "] use count for shared_ptr<Number>: "
9696
<< shared_num.use_count() << "\n";
97-
std::this_thread::sleep_for(300ms);
97+
std::this_thread::sleep_for(1s);
9898
}
9999
std::cout << "thread will end here.. use count: " << num.use_count() << "\n";
100100
}
@@ -105,7 +105,7 @@ namespace sharedpointer {
105105
auto sharedNumber = std::make_shared<Number>(10);
106106
waiter = std::async(launch::async, second_thread_func_weak,
107107
std::weak_ptr<Number>(sharedNumber));
108-
std::this_thread::sleep_for(2s);
108+
std::this_thread::sleep_for(200ms);
109109
}
110110
waiter.wait();
111111
}

0 commit comments

Comments
 (0)