You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "noxvost (via GitHub)" <gi...@apache.org> on 2025/12/12 17:12:52 UTC

[PR] Replace "synchronized" blocks in AbstractSession with ReentrantLock [mina-sshd]

noxvost opened a new pull request, #858:
URL: https://github.com/apache/mina-sshd/pull/858

   Synchronized blocks pin the virtual thread under JDK21+ to physical thread. It is better to avoid such pinning in I/O bound operations so VirtualThread planner can do its job


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [PR] Replace "synchronized" blocks in AbstractSession with ReentrantLock [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on PR #858:
URL: https://github.com/apache/mina-sshd/pull/858#issuecomment-3655029319

   There are a _lot_ more synchronized blocks and methods in Apache MINA sshd. I'm fine with replacing these two; I would object to replacing all uses of `synchronized` by re-entrant locks.
   
   If thread pinning is a problem, I think you could migrate to Java >= 24, which should have [JEP-491](https://openjdk.org/jeps/491) implemented: using `synchronized` together with virtual threads should not be a problem anymore.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [PR] Replace "synchronized" blocks in AbstractSession with ReentrantLock [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf merged PR #858:
URL: https://github.com/apache/mina-sshd/pull/858


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org