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

Best practice for using with Futures? #267

Open
charlesbthomas opened this issue Jan 12, 2025 · 1 comment
Open

Best practice for using with Futures? #267

charlesbthomas opened this issue Jan 12, 2025 · 1 comment

Comments

@charlesbthomas
Copy link

Say one has some code that still uses futures but wanted to begin using direct style concurrency.

What is the recommended and safest way to unbox the Future in a way that does not end up blocking an OS thread? Should I use a channel?

@adamw
Copy link
Member

adamw commented Jan 14, 2025

Just block on the future - we even have an util for that. As long as you are on threads that are Ox-managed, they will be virtual, so you won't block OS threads.

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

No branches or pull requests

2 participants