Commit Graph

2 Commits

Author SHA1 Message Date
Krzysztof Chruściński fb2d9ecde5 samples: zbus: work_queue: Enable synchronous printk
twister expects regex print from logging used in the sample. Sample
is using minimal logging which does not protect against logs being
interleaved if printed from various contexts. Minimal logging is
just mapping of logging API to printk. Add CONFIG_PRINTK_SYNC to
ensure that printing of each log is synchronous (with lock) and
logs are never interleaved.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-30 18:27:40 +01:00
Rodrigo Peixoto 5ed4781c54 samples: zbus: Add work queue sample
The work_queue sample illustrates three reaction styles available for
using zbus. The first is a listener that reacts by callback; use it should
for urgent reaction. The second is a listener that responds by callback;
instead of executing the code, it pushes a job to a work queue that will
be executed shortly but not immediately. The last one is the subscriber
that reacts using a queue; use it for an asynchronous reaction where the
developer would like to control the flow.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00