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

Port and cleanup of old reactive tests for Nima bulkheads #4823

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

spericas
Copy link
Member

@spericas spericas commented Sep 1, 2022

Port and cleanup of old reactive tests for Nima bulkheads. Restored Async class for convenience, now implemented using virtual threads.

…sync class for convenience, now implemented using virtual threads.
@spericas spericas added this to the 4.0.0 milestone Sep 1, 2022
@spericas spericas self-assigned this Sep 1, 2022
@spericas spericas linked an issue Sep 1, 2022 that may be closed by this pull request
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment before merging

* Runs synchronous suppliers asynchronously using virtual threads. Includes
* convenient static method to avoid creating instances of this class.
*/
public interface Async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have excluded async intentionally, as it does not really make sens - you can execute anything as a blocking operation, and if you need to run multiple things in parallel, you are better off using an executor service directly.
If you feel strongly we should keep this in for symmetry with SE and MP, then OK

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be useful to use virtual threads for running concurrent actions, to further test the infrastructure. Using supplyAsync created real threads AFAICT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we should also support supplying a custom executor service (in case the user wants to choose whether to use platform or virtual threads)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. I will add that in a follow-up PR.

@spericas spericas merged commit b6b1f66 into helidon-io:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Fix testing of FT bulkheads in Nima
2 participants