Skip to content

Commit 9ce7a4d

Browse files
authored
Adding macro 'SINK_NON_BLOCKING' to instantiate non-blocking-sink. (#49)
Blocking sinks are instantiated via macro 'SINK'
1 parent a1cc560 commit 9ce7a4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Arduino_Threads.h

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ public: \
7777
#define GET_SINK_MACRO(_1,_2,_3,NAME,...) NAME
7878
#define SINK(...) GET_SINK_MACRO(__VA_ARGS__, SINK_3_ARG, SINK_2_ARG)(__VA_ARGS__)
7979

80+
#define SINK_NON_BLOCKING(name, type) \
81+
public: \
82+
SinkNonBlocking<type> name{}; \
83+
private:
84+
8085
#define SHARED(name, type) \
8186
Shared<type> name;
8287

0 commit comments

Comments
 (0)