capture less when scheduling bundles
This commit is contained in:
parent
39bba1f5b0
commit
0398b63907
|
@ -72,7 +72,7 @@ void Receiver::dispatch(const std::shared_ptr<Message> msg) const
|
|||
*/
|
||||
void Receiver::scheduleBundle(const std::shared_ptr<Bundle> msg) const
|
||||
{
|
||||
auto invoke = [&] {
|
||||
auto invoke = [this] (const std::shared_ptr<Bundle> msg) {
|
||||
for (const auto &element: msg->elements)
|
||||
dispatch(element);
|
||||
};
|
||||
|
@ -89,7 +89,7 @@ void Receiver::scheduleBundle(const std::shared_ptr<Bundle> msg) const
|
|||
* \warning The 64-bit \cite NTPv4 NTP timestamps rollover in 2036. After which all OSC
|
||||
* Bundles will appear to be in the past and will always be invoked immediately.
|
||||
*/
|
||||
invoke();
|
||||
invoke(msg);
|
||||
else
|
||||
{
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ void Receiver::scheduleBundle(const std::shared_ptr<Bundle> msg) const
|
|||
*/
|
||||
std::thread thread([&] {
|
||||
std::this_thread::sleep_until(time);
|
||||
invoke();
|
||||
invoke(msg);
|
||||
});
|
||||
thread.detach();
|
||||
/// \test validate future OSC Bundle scheduling.
|
||||
|
|
Loading…
Reference in New Issue