-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source-braintree-native: run synchronous API calls in separate threads
The Braintree SDK make synchronous HTTP requests, which was blocking the main thread and preventing separate streams from sending concurrent API calls. Any HTTP requests made by the Braintree SDK are now wrapped in `asyncio.to_thread`, which runs the function in a separate thread. This unblocks the main thread and lets separate streams make concurrent API calls.
- Loading branch information
Showing
1 changed file
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters