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

Adding Project Loom Support #480

Open
dspangen opened this issue Apr 5, 2024 · 1 comment
Open

Adding Project Loom Support #480

dspangen opened this issue Apr 5, 2024 · 1 comment

Comments

@dspangen
Copy link

dspangen commented Apr 5, 2024

Description

Hi, I noticed there are quite a few uses of spinlocks (synchronized usage) within mina. Are there any plans to replace these with ResourceLocks to prevent thread pinning (as discussed in JEP-444)? Without it, it's not reasonable to use mina with virtual threads in all cases.

Motivation

Scalability

Alternatives considered

No response

Additional context

No response

@tomaswolf
Copy link
Member

No, there are currently no such plans. Also from JEP-444:

In a future release we may be able to remove the first limitation above, namely pinning inside synchronized.

Object monitors are a very useful language feature; replacing them all by ReentrantLocks will complicate the code and reduce its readability considerably and gives rise to new possibilities to make mistakes.

Apache MINA SSHD is built on the asynchronous I/O model; it's not clear to me how easy or complicated it might be to adapt it to virtual threads such that it actually benefits from them.

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