Skip to content

Commit f65ddbe

Browse files
committed
clock: use joinable thread
The timer thread is missing a join() which resulted in std::terminate. Change-Id: Id460030d6c02bf66c5443e7a2581b7dabd9f11b0
1 parent 4b918d5 commit f65ddbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int main(int argc [[maybe_unused]], char** argv [[maybe_unused]])
2020
spdlog::set_level(spdlog::level::trace);
2121

2222
rousette::http::EventStream::Signal sig;
23-
std::thread timer{[&sig]() {
23+
std::jthread timer{[&sig]() {
2424
for (int i = 0; /* forever */; ++i) {
2525
std::this_thread::sleep_for(666ms);
2626
spdlog::info("tick: {}", i);

0 commit comments

Comments
 (0)