Skip to content

Commit 7bf77c5

Browse files
authored
fix: change buffered to buffered_unordened for faster collecting (#457)
1 parent 3ae39c0 commit 7bf77c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tap-agent/src/agent/sender_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ impl Actor for SenderAccount {
656656
stream::iter(allocation_ids)
657657
// Create a sender allocation for each allocation
658658
.map(|allocation_id| state.create_sender_allocation(myself.clone(), allocation_id))
659-
.buffered(10) // Limit concurrency to 10 allocations at a time
659+
.buffer_unordered(10) // Limit concurrency to 10 allocations at a time
660660
.collect::<Vec<anyhow::Result<()>>>()
661661
.await
662662
.into_iter()

tap-agent/src/agent/sender_accounts_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl Actor for SenderAccountsManager {
169169
.map(|(sender_id, allocation_ids)| {
170170
state.create_or_deny_sender(myself.get_cell(), sender_id, allocation_ids)
171171
})
172-
.buffered(10) // Limit concurrency to 10 senders at a time
172+
.buffer_unordered(10) // Limit concurrency to 10 senders at a time
173173
.collect::<Vec<()>>()
174174
.await;
175175

0 commit comments

Comments
 (0)