pubsub: Mark return values as [[nodiscard]]
Since PubSub's Subscribe and Publish methods are fallible, callers need
to inspect the return values and act accordingly. This CL marks those
methods as [[nodiscard]], and updates the callsites to abort, retry, or
ignore on failure. It also adds PublishBlocking, which will wait for the
event queue lock to become available and only fail when the queue is
full.
Change-Id: I931af92105145346274b364c0ec06d7b52710d3a
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/73949
Pigweed-Auto-Submit: Aaron Green <aarongreen@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pw-internal-service-accounts.iam.gserviceaccount.com>
13 files changed