Skip to content

Usage of std::thread::sleep inside async function in assistants example #194

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

Closed
sgopalan98 opened this issue Mar 1, 2024 · 1 comment · Fixed by #200
Closed

Usage of std::thread::sleep inside async function in assistants example #194

sgopalan98 opened this issue Mar 1, 2024 · 1 comment · Fixed by #200
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sgopalan98
Copy link
Contributor

In this line in the assistants example, you are using std::thread::sleep - this would block the whole async runtime

@64bit
Copy link
Owner

64bit commented Mar 1, 2024

Thanks for the issue - PR is welcome for the fix!

This is community contributed example perhaps early in their Rust journey, but yes tokio::time::sleep would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants