Skip to content

Commit

Permalink
fix wasm compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
zh217 committed Dec 11, 2023
1 parent fc494c0 commit bd4b4f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cozo-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ impl DbInstance {
let (app2db_send, app2db_recv) = bounded(1);
let (db2app_send, db2app_recv) = bounded(1);
let db = self.clone();
#[cfg(target_arch = "wasm32")]
std::thread::spawn(move || db.run_multi_transaction(write, app2db_recv, db2app_send));
#[cfg(not(target_arch = "wasm32"))]
rayon::spawn(move || db.run_multi_transaction(write, app2db_recv, db2app_send));
MultiTransaction {
sender: app2db_send,
Expand Down

0 comments on commit bd4b4f4

Please sign in to comment.