Skip to content

redundant definition of queue size #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pnndra opened this issue Sep 16, 2021 · 1 comment
Closed

redundant definition of queue size #17

pnndra opened this issue Sep 16, 2021 · 1 comment

Comments

@pnndra
Copy link
Contributor

pnndra commented Sep 16, 2021

queue size of 0 has the same behaviour of queue size=1 hence it would make sense to move the -1 case (non blocking) to queue size = 0 and handle with queues everything else or, if we want to save a bit, move the current size=0 to size=1

https://github.com/bcmi-labs/Arduino_Threads/blob/01aca729e6480faf5f2571a182fee21b365207cf/src/Arduino_Threads.h#L72

@aentinger
Copy link
Contributor

This issue is no longer relevant since the difference between blocking sinks with size 1, blocking sinks with size > 1 and non-blocking sinks is governed via the instantiation macros, i.e.
Blocking sink, size = 1

SINK(led, bool);

Blocking sink, size > 1

SINK(counter, int, 10);

Non blocking sink

SINK_NON_BLOCKING(counter, int);

Also see #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants