Aikido
ExecutorThread-impl.hpp
Go to the documentation of this file.
1
#include "
aikido/common/ExecutorThread.hpp
"
2
3
namespace
aikido
{
4
namespace
common {
5
6
//==============================================================================
7
template
<
typename
Duration>
8
ExecutorThread::ExecutorThread
(
9
std::function<
void
()> callback,
const
Duration& period)
10
: mCallback{std::move(callback)}
11
, mPeriod{std::chrono::duration_cast<std::chrono::milliseconds>(period)}
12
, mIsRunning{
true
}
13
, mThread{std::thread{&
ExecutorThread::spin
,
this
}}
14
{
15
// Do nothing
16
}
17
18
}
// namespace common
19
}
// namespace aikido
aikido
Format of serialized trajectory in YAML.
Definition:
algorithm.hpp:4
aikido::common::ExecutorThread::spin
void spin()
The loop function that will be executed by the thread.
aikido::common::ExecutorThread::ExecutorThread
ExecutorThread(std::function< void()> callback, const Duration &period)
Constructs from callback and period.
Definition:
ExecutorThread-impl.hpp:8
ExecutorThread.hpp
include
aikido
common
detail
ExecutorThread-impl.hpp
Generated on Fri Mar 10 2023 20:07:57 for Aikido by
1.8.17