We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f202a commit f23f86fCopy full SHA for f23f86f
vortex-scan/src/multi_scan.rs
@@ -102,9 +102,11 @@ impl<T: Send + Sync + 'static> Iterator for MultiScanIterator<T> {
102
let stealer_id = self.next_stealer_id.fetch_add(1, SeqCst) % stealer_count;
103
let stealer = &self.stealers.read()[stealer_id];
104
105
- // Attempt to steal ~half of the work and push it into `worker`.
106
- if let Steal::Success(_) = stealer.steal_batch(&self.worker) {
107
- break;
+ if !stealer.is_empty() {
+ // Attempt to steal ~half of the work and push it into `worker`.
+ if let Steal::Success(_) = stealer.steal_batch(&self.worker) {
108
+ break;
109
+ }
110
}
111
112
0 commit comments