mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-27 16:09:58 -07:00
Remove blocking code and spawn_blocking
Rayhunter uses a mixture of spawn and spawn_blocking, then also does some blocking operations inside of async code. Move everything to async. This allows us to use the single-threaded runtime. Now the binary is 100kB smaller, and the memory usage also improved by ~100kB on tplink.
This commit is contained in:
committed by
Will Greenberg
parent
9694aa826b
commit
f8824ce7e7
@@ -182,7 +182,7 @@ fn run_shutdown_thread(
|
||||
})
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() -> Result<(), RayhunterError> {
|
||||
env_logger::init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user