21#include "events/EventQueue.h"
22#include "platform/mbed_assert.h"
23#include "platform/mbed_error.h"
31static constexpr std::chrono::duration<int, std::milli> non_periodic{-1};
49template <
typename... ArgTs>
52 using duration = std::chrono::duration<int, std::milli>;
66 _event =
static_cast<struct event *
>(
67 equeue_alloc(&q->_equeue,
sizeof(
struct event) +
sizeof(F)));
70 _event->equeue = &q->_equeue;
72 _event->delay = duration(0);
73 _event->period = non_periodic;
75 _event->post = &Event::event_post<F>;
76 _event->dtor = &Event::event_dtor<F>;
78 new (_event + 1) F(std::move(f));
101 new (
this)
Event(that);
113 if (_event->ref == 0) {
114 _event->dtor(_event);
115 equeue_dealloc(_event->equeue, _event);
137 MBED_DEPRECATED_SINCE(
"mbed-os-6.0.0",
"Pass a chrono duration, not an integer millisecond count. For example use `5s` rather than `5000`.")
153 if (p > duration(0)) {
157 if (p != non_periodic) {
158 MBED_WARNING(MBED_ERROR_INVALID_ARGUMENT,
159 "Invalid period specified, defaulting to non_periodic.");
161 _event->period = non_periodic;
171 MBED_DEPRECATED_SINCE(
"mbed-os-6.0.0",
"Pass a chrono duration, not an integer millisecond count. For example use `5s` rather than `5000`.")
196 _event->id = _event->post(_event, args...);
216 return call(args...);
224 static void thunk(
void *func, ArgTs... args)
226 return static_cast<Event *
>(func)->call(args...);
243 equeue_cancel(_event->equeue, _event->id);
256 int (*post)(
struct event *, ArgTs... args);
257 void (*dtor)(
struct event *);
263 template <
typename F>
264 static int event_post(
struct event *e, ArgTs... args)
266 typedef EventQueue::context<F, ArgTs...> C;
267 void *p = equeue_alloc(e->equeue,
sizeof(C));
272 new (p) C(*(F *)(e + 1), args...);
273 equeue_event_delay(p, e->delay.count());
274 equeue_event_period(p, e->period.count());
275 equeue_event_dtor(p, &EventQueue::function_dtor<C>);
276 return equeue_post(e->equeue, &EventQueue::function_call<C>, p);
279 template <
typename F>
280 static void event_dtor(
struct event *e)
282 ((F *)(e + 1))->~F();
294 template <
typename F,
typename... ContextArgTs>
296 Event(q,
EventQueue::context<F, ContextArgTs...>(f, context_args...)) { }
301 template <
typename T,
typename R,
typename B0>
303 Event(q, mbed::callback(obj, method), b0) { }
308 template <
typename T,
typename R,
typename B0>
310 Event(q, mbed::callback(obj, method), b0) { }
315 template <
typename T,
typename R,
typename B0>
317 Event(q, mbed::callback(obj, method), b0) { }
322 template <
typename T,
typename R,
typename B0>
323 Event(
EventQueue *q,
const volatile T *obj, R(T::*method)(B0, ArgTs...)
const volatile, B0 b0) :
324 Event(q, mbed::callback(obj, method), b0) { }
329 template <
typename T,
typename R,
typename B0,
typename B1>
331 Event(q, mbed::callback(obj, method), b0, b1) { }
336 template <
typename T,
typename R,
typename B0,
typename B1>
337 Event(
EventQueue *q,
const T *obj, R(T::*method)(B0, B1, ArgTs...)
const, B0 b0, B1 b1) :
338 Event(q, mbed::callback(obj, method), b0, b1) { }
343 template <
typename T,
typename R,
typename B0,
typename B1>
344 Event(
EventQueue *q,
volatile T *obj, R(T::*method)(B0, B1, ArgTs...)
volatile, B0 b0, B1 b1) :
345 Event(q, mbed::callback(obj, method), b0, b1) { }
350 template <
typename T,
typename R,
typename B0,
typename B1>
351 Event(
EventQueue *q,
const volatile T *obj, R(T::*method)(B0, B1, ArgTs...)
const volatile, B0 b0, B1 b1) :
352 Event(q, mbed::callback(obj, method), b0, b1) { }
357 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2>
358 Event(
EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, ArgTs...), B0 b0, B1 b1, B2 b2) :
359 Event(q, mbed::callback(obj, method), b0, b1, b2) { }
364 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2>
365 Event(
EventQueue *q,
const T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
const, B0 b0, B1 b1, B2 b2) :
366 Event(q, mbed::callback(obj, method), b0, b1, b2) { }
371 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2>
372 Event(
EventQueue *q,
volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
volatile, B0 b0, B1 b1, B2 b2) :
373 Event(q, mbed::callback(obj, method), b0, b1, b2) { }
378 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2>
379 Event(
EventQueue *q,
const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
const volatile, B0 b0, B1 b1, B2 b2) :
380 Event(q, mbed::callback(obj, method), b0, b1, b2) { }
385 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3>
386 Event(
EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3) :
387 Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { }
392 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3>
393 Event(
EventQueue *q,
const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
const, B0 b0, B1 b1, B2 b2, B3 b3) :
394 Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { }
399 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3>
400 Event(
EventQueue *q,
volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
volatile, B0 b0, B1 b1, B2 b2, B3 b3) :
401 Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { }
406 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3>
407 Event(
EventQueue *q,
const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
const volatile, B0 b0, B1 b1, B2 b2, B3 b3) :
408 Event(q, mbed::callback(obj, method), b0, b1, b2, b3) { }
413 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4>
414 Event(
EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) :
415 Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { }
420 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4>
421 Event(
EventQueue *q,
const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
const, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) :
422 Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { }
427 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4>
428 Event(
EventQueue *q,
volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) :
429 Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { }
434 template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4>
435 Event(
EventQueue *q,
const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
const volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) :
436 Event(q, mbed::callback(obj, method), b0, b1, b2, b3, b4) { }
441#if !defined(DOXYGEN_ONLY)
445template <
typename R,
typename... ArgTs>
448 return Event<void(ArgTs...)>(
this, func);
451template <
typename T,
typename R,
typename... ArgTs>
457template <
typename T,
typename R,
typename... ArgTs>
458Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(ArgTs...)
const)
463template <
typename T,
typename R,
typename... ArgTs>
464Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(ArgTs...)
volatile)
469template <
typename T,
typename R,
typename... ArgTs>
470Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(ArgTs...)
const volatile)
475template <
typename R,
typename... ArgTs>
478 return Event<void(ArgTs...)>(
this, cb);
481template <
typename R,
typename B0,
typename C0,
typename... ArgTs>
484 return Event<void(ArgTs...)>(
this, func, c0);
487template <
typename T,
typename R,
typename B0,
typename C0,
typename... ArgTs>
488Event<void(ArgTs...)>
EventQueue::event(T *obj, R(T::*method)(B0, ArgTs...), C0 c0)
490 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0);
493template <
typename T,
typename R,
typename B0,
typename C0,
typename... ArgTs>
494Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(B0, ArgTs...)
const, C0 c0)
496 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0);
499template <
typename T,
typename R,
typename B0,
typename C0,
typename... ArgTs>
500Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(B0, ArgTs...)
volatile, C0 c0)
502 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0);
505template <
typename T,
typename R,
typename B0,
typename C0,
typename... ArgTs>
506Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(B0, ArgTs...)
const volatile, C0 c0)
508 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0);
511template <
typename R,
typename B0,
typename C0,
typename... ArgTs>
514 return Event<void(ArgTs...)>(
this, cb, c0);
517template <
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
520 return Event<void(ArgTs...)>(
this, func, c0, c1);
523template <
typename T,
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
524Event<void(ArgTs...)>
EventQueue::event(T *obj, R(T::*method)(B0, B1, ArgTs...), C0 c0, C1 c1)
526 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1);
529template <
typename T,
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
530Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(B0, B1, ArgTs...)
const, C0 c0, C1 c1)
532 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1);
535template <
typename T,
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
536Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(B0, B1, ArgTs...)
volatile, C0 c0, C1 c1)
538 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1);
541template <
typename T,
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
542Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(B0, B1, ArgTs...)
const volatile, C0 c0, C1 c1)
544 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1);
547template <
typename R,
typename B0,
typename B1,
typename C0,
typename C1,
typename... ArgTs>
550 return Event<void(ArgTs...)>(
this, cb, c0, c1);
553template <
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
554Event<void(ArgTs...)>
EventQueue::event(R(*func)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2)
556 return Event<void(ArgTs...)>(
this, func, c0, c1, c2);
559template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
560Event<void(ArgTs...)>
EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, ArgTs...), C0 c0, C1 c1, C2 c2)
562 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2);
565template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
566Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
const, C0 c0, C1 c1, C2 c2)
568 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2);
571template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
572Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
volatile, C0 c0, C1 c1, C2 c2)
574 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2);
577template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
578Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...)
const volatile, C0 c0, C1 c1, C2 c2)
580 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2);
583template <
typename R,
typename B0,
typename B1,
typename B2,
typename C0,
typename C1,
typename C2,
typename... ArgTs>
586 return Event<void(ArgTs...)>(
this, cb, c0, c1, c2);
589template <
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
590Event<void(ArgTs...)>
EventQueue::event(R(*func)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3)
592 return Event<void(ArgTs...)>(
this, func, c0, c1, c2, c3);
595template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
596Event<void(ArgTs...)>
EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3)
598 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3);
601template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
602Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
const, C0 c0, C1 c1, C2 c2, C3 c3)
604 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3);
607template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
608Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
volatile, C0 c0, C1 c1, C2 c2, C3 c3)
610 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3);
613template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
614Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...)
const volatile, C0 c0, C1 c1, C2 c2, C3 c3)
616 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3);
619template <
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename C0,
typename C1,
typename C2,
typename C3,
typename... ArgTs>
622 return Event<void(ArgTs...)>(
this, cb, c0, c1, c2, c3);
625template <
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
626Event<void(ArgTs...)>
EventQueue::event(R(*func)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
628 return Event<void(ArgTs...)>(
this, func, c0, c1, c2, c3, c4);
631template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
632Event<void(ArgTs...)>
EventQueue::event(T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
634 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3, c4);
637template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
638Event<void(ArgTs...)>
EventQueue::event(
const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
const, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
640 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3, c4);
643template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
644Event<void(ArgTs...)>
EventQueue::event(
volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
646 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3, c4);
649template <
typename T,
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
650Event<void(ArgTs...)>
EventQueue::event(
const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...)
const volatile, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
652 return Event<void(ArgTs...)>(
this,
mbed::callback(obj, method), c0, c1, c2, c3, c4);
655template <
typename R,
typename B0,
typename B1,
typename B2,
typename B3,
typename B4,
typename C0,
typename C1,
typename C2,
typename C3,
typename C4,
typename... ArgTs>
656Event<void(ArgTs...)>
EventQueue::event(
mbed::Callback<R(B0, B1, B2, B3, B4, ArgTs...)> cb, C0 c0, C1 c1, C2 c2, C3 c3, C4 c4)
658 return Event<void(ArgTs...)>(
this, cb, c0, c1, c2, c3, c4);
Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3)
Create an event.
Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2)
Create an event.
int post(ArgTs... args) const
Posts an event onto the underlying event queue.
Event & operator=(const Event &that)
Assignment operator for events.
static void thunk(void *func, ArgTs... args)
Static thunk for passing as C-style function.
Event(EventQueue *q, const T *obj, R(T::*method)(B0, ArgTs...) const, B0 b0)
Create an event.
Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, ArgTs...), B0 b0, B1 b1, B2 b2)
Create an event.
void call(ArgTs... args) const
Posts an event onto the underlying event queue, returning void.
void period(duration p)
Configure the period of an event.
Event(const Event &e)
Copy constructor for events.
void operator()(ArgTs... args) const
Posts an event onto the underlying event queue, returning void.
Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) volatile, B0 b0, B1 b1, B2 b2, B3 b3)
Create an event.
Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4)
Create an event.
Event(EventQueue *q, F f, ContextArgTs... context_args)
Create an event.
Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, ArgTs...) volatile, B0 b0)
Create an event.
Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, ArgTs...) volatile, B0 b0, B1 b1, B2 b2)
Create an event.
void delay(duration d)
Configure the delay of an event.
void cancel() const
Cancels the most recently posted event.
Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4)
Create an event.
~Event()
Destructor for events.
Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const, B0 b0, B1 b1, B2 b2, B3 b3)
Create an event.
Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, ArgTs...) const volatile, B0 b0)
Create an event.
Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, ArgTs...) const volatile, B0 b0, B1 b1)
Create an event.
Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, ArgTs...) const, B0 b0, B1 b1)
Create an event.
Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...), B0 b0, B1 b1, B2 b2, B3 b3, B4 b4)
Create an event.
Event(EventQueue *q, T *obj, R(T::*method)(B0, B1, ArgTs...), B0 b0, B1 b1)
Create an event.
Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, B2, B3, B4, ArgTs...) volatile, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4)
Create an event.
Event(EventQueue *q, F f)
Create an event.
Event(EventQueue *q, T *obj, R(T::*method)(B0, ArgTs...), B0 b0)
Create an event.
Event(EventQueue *q, const volatile T *obj, R(T::*method)(B0, B1, B2, B3, ArgTs...) const volatile, B0 b0, B1 b1, B2 b2, B3 b3)
Create an event.
Event(EventQueue *q, volatile T *obj, R(T::*method)(B0, B1, ArgTs...) volatile, B0 b0, B1 b1)
Create an event.
Event(EventQueue *q, const T *obj, R(T::*method)(B0, B1, B2, ArgTs...) const, B0 b0, B1 b1, B2 b2)
Create an event.
Event< void(ArgTs...)> event(R(*func)(BoundArgTs..., ArgTs...), ContextArgTs ...context_args)
Creates an event bound to the event queue.
Callback class based on template specialization.