can remove lock in Batch if limit is 1 #1590
Replies: 1 comment 1 reply
-
only if the
I think it would be possible to do that, but it would probably make the code more complicated. The simplest way to do it would probably be to make |
Beta Was this translation helpful? Give feedback.
-
when threads > 1 , the limit is 1
and then when BatchSender send every time only send 1 Batch(because when items.len() == 1, the batch will be sent)
this means in that situation, can we remove the lock?
avoid everytime alloc mutex and lock,just send the item directly without Arc<Mutex<>>?
Beta Was this translation helpful? Give feedback.
All reactions