Skip to content

Commit aea3ad4

Browse files
authored
Update README.md
1 parent 2faea47 commit aea3ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If enqueuer and dequeuer tasks are done with a limited number of enqueue/dequeue
2121

2222
let rb = Arc::new(ShardedRingBuf::new(max_items, shards));
2323

24-
let mut deq_tasks = Vec::with_capacity(shards);
24+
let mut deq_tasks = Vec::with_capacity(task_count);
2525
let mut enq_tasks = Vec::with_capacity(task_count);
2626

2727
// spawn enq tasks with shift by policy
@@ -44,7 +44,7 @@ If enqueuer and dequeuer tasks are done with a limited number of enqueue/dequeue
4444
max_items,
4545
ShardPolicy::ShiftBy {
4646
initial_index: Some(i),
47-
shift: shards,
47+
shift: task_count,
4848
},
4949
|_| {
5050
// can put a function here optionally

0 commit comments

Comments
 (0)