Skip to content

Use score::cpp::jthread where applicable - #632

Open
paulquiring wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:paulquiring/use-jthread
Open

paulquiring wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:paulquiring/use-jthread

Conversation

@paulquiring

@paulquiring paulquiring commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

score::cpp::jthread is used where applicable

@MaciejKaszynski MaciejKaszynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are also these files that use std::thread:

  1. score/launch_manager/src/daemon/src/alive_monitor/details/daemon/AliveMonitorImpl.hpp
  2. score/launch_manager/src/daemon/src/common/concurrency/thread_pool.hpp

Or could be done in a later PR.

score::mw::lifecycle::internal::osal::OsalReturnType::kSuccess == init_result,
"ControlClient semaphore initialization failed");
ipc_response_thread_ = std::make_unique<std::thread>(&ControlClientImpl::run, this);
ipc_response_thread_ = score::cpp::jthread([this](score::cpp::stop_token stop_token) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be able to just give the forward the args like a normal std::thread https://github.com/eclipse-score/baselibs/blob/e1d74ac2183338be0e2f65b0d1f807a0a393a07f/score/language/futurecpp/include/score/jthread.hpp#L136. Then we don't need the lambda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants