MCPcopy Create free account
hub / github.com/AimRT/AimRT / IsInCurrentExecutor

Method IsInCurrentExecutor

src/runtime/core/executor/asio_thread_executor.cc:125–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125bool AsioThreadExecutor::IsInCurrentExecutor() const noexcept {
126 try {
127 auto finditr = std::find(thread_id_vec_.begin(), thread_id_vec_.end(), std::this_thread::get_id());
128 return (finditr != thread_id_vec_.end());
129 } catch (const std::exception& e) {
130 AIMRT_ERROR("{}", e.what());
131 }
132 return false;
133}
134
135void AsioThreadExecutor::Execute(aimrt::executor::Task&& task) noexcept {
136 if (state_.load() != State::kInit && state_.load() != State::kStart) [[unlikely]] {

Callers

nothing calls this directly

Calls 1

whatMethod · 0.80

Tested by

no test coverage detected