Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_transfer: Set event loop in non-main thread
When the Python pw_transfer.Manager is created, it creates a new asyncio event loop, which is auto-registered if created in the main thread. However, if the pw_transfer.Manager is created in a non-main thread, this event loop is not registered, and the pw_transfer.Manager constructor will fail with "RuntimeError: There is no current event loop in thread 'THREAD_NAME'.". Check if in non-main thread to register the new event loop. Change-Id: Ia22260a0ecd5d1921957efd6d42f534cfbdd5676 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/100415 Pigweed-Auto-Submit: Carlos Chinchilla <[email protected]> Commit-Queue: Wyatt Hepler <[email protected]> Reviewed-by: Wyatt Hepler <[email protected]> Commit-Queue: Carlos Chinchilla <[email protected]>
- Loading branch information