Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reset running flag when exiting thread #359

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/EventLoop.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class EventLoop : public TimeService
inline void SetStopping(int code)
{
exitCode = code;
running = false;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/EventLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void EventLoop::Run(const std::chrono::milliseconds &duration)
auto until = duration < std::chrono::milliseconds::max() ? now + duration : std::chrono::milliseconds::max();

//Run until ended
while(running && now<=until)
while(running && !exitCode.has_value() && now<=until)
bcostdolby marked this conversation as resolved.
Show resolved Hide resolved
{
//TRACE_EVENT("eventloop", "EventLoop::Run::Iteration");

Expand Down
Loading