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

Similar to run on context, but to run on Virtual Thread. #139

Open
cristian-joseb opened this issue Jul 15, 2024 · 2 comments
Open

Similar to run on context, but to run on Virtual Thread. #139

cristian-joseb opened this issue Jul 15, 2024 · 2 comments

Comments

@cristian-joseb
Copy link

cristian-joseb commented Jul 15, 2024

Describe the feature

Have a class to run unit test using Virtual Thread

Use cases

Provide the ability to write sync unit test, in today scenario it is not possible to call Future.await in a unit test.

Contribution

Who should implement this feature ? are you volunteering for implementing this feature or
do you know that is able and willing implement this feature ?

yes, I can implement it.

@tsegismont
Copy link
Contributor

@cristian-joseb thanks for suggesting this.

Rather than adding a class, I think we could have a io.vertx.core.ThreadingModel parameter in the RunOnContext constructor.

And then, instead of always creating an event loop context, we use the value of this parameter to decided the type of context that must be created.

Thoughts?

If you're willing to send a PR, I'd be glad to review.

@cristian-joseb
Copy link
Author

Yes, makes sense I will open the PR shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants