[roll third_party/pigweed] pw_hdlc: Mitigate errors on Python background thread
Prior to this change, when an exception was encountered by the
DataReaderAndExecutor background thread, it would hammer on _read()
indefinitely until the program was shut down.
With the addition of logging in pwrev/155814, this caused error messages
to be spammed to the log very rapidly.
This commit mitigates the issue, without significantly changing the API,
by exiting the reader thread when an exception is encountered.
This also adds a stop() method and close() methods on HdlcRpcClient
to signal the thread to stop. Currently, this is opportunistic as it is
unable to interrupt a blocking read() call.
pw_hdlc.rpc:
- Move reader thread into DataReaderAndExecutor.
- Make RpcClient classes a context manager.
- Improve logging of read errors to include backtrace.
- Add a test for these shutdown cases.
Test: ninja -C out
Original-Bug: 293595266
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/162712
https://pigweed.googlesource.com/pigweed/pigweed
third_party/pigweed Rolled-Commits: 663489878b701a7..39af5c9dbab0e5b
Roller-URL: https://ci.chromium.org/b/8773022429563849697
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I22aaebe54536fd6866bb7af8cf48c1bbb7491758
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/165550
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/third_party/pigweed b/third_party/pigweed
index 6634898..39af5c9 160000
--- a/third_party/pigweed
+++ b/third_party/pigweed
@@ -1 +1 @@
-Subproject commit 663489878b701a71ffdd558a2df80a39fb15201c
+Subproject commit 39af5c9dbab0e5bf44bc19b2a2ce46e9206a2ddf