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

Bounded keepalive threads #986

Open
wylswz opened this issue Feb 21, 2025 · 1 comment
Open

Bounded keepalive threads #986

wylswz opened this issue Feb 21, 2025 · 1 comment

Comments

@wylswz
Copy link

wylswz commented Feb 21, 2025

KeepAlive currently extends Thread, which are relatively expensive to create and maintain.

Is it possible to manage all keepalives using one or just a few threads?

Originally posted by @wylswz in #985

I can try to implement one, and if that works well, I'll start a pull request. Let me create an issue from this.

Originally posted by @wylswz in #985 (reply in thread)

@wylswz
Copy link
Author

wylswz commented Feb 21, 2025

I'm planning to add a KeepAliveProvider implementation, that produces something equivalent to net.schmizz.keepalive.KeepAliveRunner. Instead of creating a new thread on start, it registers the KeepAlive object to a priority queue managed by configurable number of worker threads.

wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Feb 21, 2025
wylswz added a commit to wylswz/sshj that referenced this issue Mar 20, 2025
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

1 participant