[Fix Configuration Loader] Migrate Thread Scheduling Logic into BraintreeClient
Note: This PR is Part 5 in a series of refactoring PRs to eliminate ConfigurationLoader race conditions.
Previous PR: #1133 [Fix Configuration Loader] Prevent Race Condition
Summary of changes
- This PR migrates multi-threading logic into BraintreeClient to set up an eventual easy migration to coroutines
- In the future, we can leverage co-routines to reduce the SDK's responsibility to create background threads.
- Upcoming Tasks to finish Fix Configuration Loader PR series:
- Remove
HttpClientand make all networking clients thread synchronous by default - Implement retry logic in
ConfigurationLoader
- Remove
Checklist
- [ ] ~Added a changelog entry~
- [x] Relevant test coverage
Authors
List GitHub usernames for everyone who contributed to this pull request.
- @sshropshire
@tdchow is this PR and the PRs in the base branch something we still need to get into v5? It's been inactive for a bit so wasn't sure if this still needed another 👍 and for us to open a PR from base to main.
@tdchow is this PR and the PRs in the base branch something we still need to get into v5? It's been inactive for a bit so wasn't sure if this still needed another 👍 and for us to open a PR from base to main.
@sshropshire is this part 5 the final changes needed for the configuration loader refactor? would we be good merging the feature branch into main after this PR?
It's definitely close. There's retry logic that needs to be re-implemented for this to be fully complete. It used to happen in HttpClient but it makes more sense for it to live in ConfigurationLoader.
@sshropshire @tdchow what state is this PR in? Does it need more work or are we good to merge?
@saperi22 - We decided to put the ConfigurationLoader work on hold for now. I'll go ahead and close this PR.