Skip to content

Commit 5444db5

Browse files
rushmoremtobiemh
andauthored
Fix parallel iteration (#5250)
Co-authored-by: Tobie Morgan Hitchcock <[email protected]>
1 parent 17aa7cc commit 5444db5

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

crates/core/src/dbs/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ impl Iterator {
739739
// Count the result
740740
self.count += 1;
741741
// Periodically yield
742-
if self.count % 100 == 0 {
742+
if !stm.parallel() && self.count % 100 == 0 {
743743
yield_now!();
744744
}
745745
// Process the result

crates/core/src/dbs/statement.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ impl<'a> Statement<'a> {
371371
}
372372

373373
/// Returns any PARALLEL clause if specified
374-
#[cfg(not(target_arch = "wasm32"))]
375374
pub(crate) fn parallel(&self) -> bool {
376375
match self {
377376
Statement::Select(v) => v.parallel,

crates/core/src/mac/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,14 @@ mod test {
272272
let Error::Unreachable(msg) = fail!("Reached unreachable code") else {
273273
panic!()
274274
};
275-
assert_eq!("crates/core/src/mac/mod.rs:263: Reached unreachable code", msg);
275+
assert_eq!("crates/core/src/mac/mod.rs:272: Reached unreachable code", msg);
276276
}
277277

278278
#[test]
279279
fn fail_arguments() {
280280
let Error::Unreachable(msg) = fail!("Found {} but expected {}", "test", "other") else {
281281
panic!()
282282
};
283-
assert_eq!("crates/core/src/mac/mod.rs:271: Found test but expected other", msg);
283+
assert_eq!("crates/core/src/mac/mod.rs:280: Found test but expected other", msg);
284284
}
285285
}

0 commit comments

Comments
 (0)