Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Sync (Default) and Async For All Functions/Classes #200

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Implement Sync (Default) and Async For All Functions/Classes #200

merged 1 commit into from
Dec 7, 2023

Conversation

davidvonthenen
Copy link
Contributor

@davidvonthenen davidvonthenen commented Dec 7, 2023

Depends on #199

This implements Sync (Default) and Async For All Functions/Classes. I was originally going to deprecate the Async to reduce the amount of code to maintain, but I convinced myself to support both. There is some utility to having the Async functions as they are good for things like:

  • quick development and prototyping
  • demos when speed isn't important

All examples were updated to use the sync functions/classes, and provided a couple of examples for async.

This follows the pattern a lot of other IO/CPU intensive libraries have set where sync/threading is the default and async is an option. Some good examples to reference are libraries that we consume in this SDK. For example:

@davidvonthenen
Copy link
Contributor Author

rebased changes after merging #199

SandraRodgers
SandraRodgers previously approved these changes Dec 7, 2023
examples/README.md Outdated Show resolved Hide resolved
@davidvonthenen davidvonthenen merged commit 94e9e7c into deepgram:main Dec 7, 2023
1 check passed
@davidvonthenen davidvonthenen deleted the handle-sync-async-prerecorded branch December 7, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants