Skip to content

Commit

Permalink
Correctly pre-allocate number of receivers (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-statsig authored Oct 10, 2023
1 parent 85423c3 commit 49d30b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pubsub/src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl Publisher {
pub(crate) fn new(fqtn: String, pubc: PublisherClient, config: Option<PublisherConfig>) -> Self {
let config = config.unwrap_or_default();
let (sender, receiver) = async_channel::unbounded::<Reserved>();
let mut receivers = Vec::with_capacity(1 + config.workers);
let mut receivers = Vec::with_capacity(config.workers * 2);
let mut ordering_senders = Vec::with_capacity(config.workers);

// for non-ordering key message
Expand Down

0 comments on commit 49d30b0

Please sign in to comment.