envoyproxy / envoy-mobile

Client HTTP and networking library based on the Envoy project for iOS, Android, and more.
https://envoymobile.io
Apache License 2.0
557 stars 84 forks source link

Cleanup threading/ownership semantics of PlatformBridgeCertValidator #2713

Closed RyanTheOptimist closed 1 year ago

RyanTheOptimist commented 1 year ago

Cleanup threading/ownership semantics of PlatformBridgeCertValidator by only running static methods on the worker thread. The worker thread is owned by the Validator which join()s the thread before deleting it. So by making the worker thread only operate on data copied (or moved) into the the thread, we avoid multi-threaded access.

Risk Level: Low - Not in production Testing: Existing unit Docs Changes: N/A Release Notes: N/A

RyanTheOptimist commented 1 year ago

@jpsim Can you take a look at this? After working on #2696 for a while, I eventually concluded that this approach was simpler/clearer. But what do you think?