From 02e758ec8df7a71bf4e375ac2843abe4b49d56a6 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Fri, 5 Nov 2021 10:32:44 +0100 Subject: [PATCH] Adding macro 'SINK_NON_BLOCKING' to instantiate non-blocking-sink. Blocking sinks are instantiated via macro 'SINK' --- src/Arduino_Threads.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Arduino_Threads.h b/src/Arduino_Threads.h index 11902bf..1750f95 100644 --- a/src/Arduino_Threads.h +++ b/src/Arduino_Threads.h @@ -77,6 +77,11 @@ public: \ #define GET_SINK_MACRO(_1,_2,_3,NAME,...) NAME #define SINK(...) GET_SINK_MACRO(__VA_ARGS__, SINK_3_ARG, SINK_2_ARG)(__VA_ARGS__) +#define SINK_NON_BLOCKING(name, type) \ +public: \ + SinkNonBlocking name{}; \ +private: + #define SHARED(name, type) \ Shared name;