Use crossbeam channel insteaf of SegQueue

Reduces overutilization of CPU greatly
This commit is contained in:
Joakim Frostegård 2020-04-11 21:11:25 +02:00
parent f37ba1e52e
commit 70cc193522
7 changed files with 88 additions and 59 deletions

View file

@ -6,8 +6,6 @@
* Generic bench function since current functions are almost identical
* Show percentile stats for peers per torrent
* aquatic
* Park handler threads when really inactive? Or generally avoid utilizing
CPU needlessly. See https://docs.rs/crossbeam/0.7.3/crossbeam/utils/struct.Backoff.html#method.is_completed
* Lock whole torrent map over many requests in handlers? Could use HashMap
in Mutex instead of DashMap maybe (parking lot mutex?)
* Tests
@ -16,7 +14,6 @@
ones, have to check.
* bittorrent_udp
* other test cases
* Check if announce response to bytes code changed caused slowdown
## Not important