Skip to content

Commit

Permalink
feat: glommio support
Browse files Browse the repository at this point in the history
  • Loading branch information
aembke committed Sep 3, 2024
1 parent 0549796 commit 73fd880
Show file tree
Hide file tree
Showing 50 changed files with 1,122 additions and 865 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ subscriber-client = ["i-pubsub"]
transactions = []
trust-dns-resolver = ["dep:trust-dns-resolver"]
unix-sockets = []
glommio = ["dep:glommio", "futures-io", "pin-project", "rm-send-macros/enabled", "async-oneshot"]

# Enable experimental support for the Glommio runtime.
glommio = ["dep:glommio", "futures-io", "pin-project", "rm-send-macros/enabled", "oneshot", "futures-lite"]

# Enables rustls with the rustls/aws_lc_rs crypto backend
enable-rustls = [
Expand Down Expand Up @@ -193,7 +195,8 @@ urlencoding = "2.1"
glommio = { version = "0.9.0", optional = true }
futures-io = { version = "0.3", optional = true }
pin-project = { version = "1.1.5", optional = true }
async-oneshot = { version = "0.5", optional = true }
oneshot = { version = "0.1.8", optional = true, features = ["async"] }
futures-lite = { version = "2.3", optional = true }
rm-send-macros = { git = "https://github.com/aembke/rm-send-macros" }

[dev-dependencies]
Expand Down
7 changes: 6 additions & 1 deletion examples/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ use tokio::time::sleep;

#[tokio::main]
async fn main() -> Result<(), RedisError> {
let publisher_client = RedisClient::default();
let publisher_client = Builder::default_centralized()
.with_performance_config(|config| {
// change the buffer size of the broadcast channels used by the EventInterface
config.broadcast_channel_capacity = 64;
})
.build()?;
let subscriber_client = publisher_client.clone_new();
publisher_client.init().await?;
subscriber_client.init().await?;
Expand Down
Loading

0 comments on commit 73fd880

Please sign in to comment.