cjdelisle / packetcrypt_rs

PacketCrypt in Rust
53 stars 43 forks source link

Prefer reuse of recently used uploader threads to improve connection reuse #61

Open UCIS opened 8 months ago

UCIS commented 8 months ago

Prefer reuse of recently used uploader threads over the semi-random selection that occurs with idle wait loop to improve connection reuse. For miners on a fast connection, this should reduce the number of idle keepalive connections, saving resources on the miner and pool. The configured number of uploaders will behave like an upper limit rather than an absolute number. An added bonus might be that the more aggressive reuse of connections could reduce the number of reconnections and slow-start situations because idle connections keep timing out.