Skip to content

Commit

Permalink
Fix blockin 1 cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
the2pizza committed Jan 17, 2025
1 parent fde61bd commit d60db1e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pony"
version = "0.0.11-dev"
version = "0.0.12-dev"
edition = "2021"
build = "build.rs"

Expand Down
4 changes: 2 additions & 2 deletions src/bin/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use pony::{

#[derive(Parser)]
#[command(
version = "0.0.11-dev",
version = "0.0.12-dev",
about = "Pony Agent - control tool for Xray/Wireguard"
)]
struct Cli {
Expand Down Expand Up @@ -292,6 +292,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}

// Run all tasks
let _ = futures::future::try_join_all(tasks).await;
let _ = futures::future::join_all(tasks).await;
Ok(())
}
2 changes: 1 addition & 1 deletion src/bin/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use pony::{

#[derive(Parser)]
#[command(
version = "0.0.11-dev",
version = "0.0.12-dev",
about = "Pony Api - control tool for Xray/Wireguard"
)]
struct Cli {
Expand Down
1 change: 1 addition & 0 deletions src/zmq/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub async fn subscriber(
);

loop {
tokio::task::yield_now().await;
match subscriber.recv_string(0) {
Ok(Ok(data)) => {
let data = data.to_string();
Expand Down

0 comments on commit d60db1e

Please sign in to comment.