mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Conditionally enable multithreaded implementation
This commit is contained in:
parent
d912975b1e
commit
e06d122dbb
@ -41,11 +41,3 @@ tracing-wasm = { version = "0.2.1", optional = true } # FIXME: Low quality depen
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.31"
|
||||
|
||||
|
||||
[profile.dev]
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
opt-level = 's'
|
||||
panic = "abort"
|
||||
strip = "debuginfo"
|
||||
|
||||
@ -42,9 +42,8 @@ pub fn wasm_bindgen_start() {
|
||||
pub fn create_pool_scheduler(
|
||||
new_worker: js_sys::Function,
|
||||
) -> *mut Scheduler<WebWorkerPoolScheduleMethod> {
|
||||
let scheduler = Box::new(Scheduler::new(WebWorkerPoolScheduleMethod::new(new_worker)));
|
||||
|
||||
Box::into_raw(scheduler)
|
||||
let scheduler = Scheduler::new(WebWorkerPoolScheduleMethod::new(new_worker));
|
||||
Box::into_raw(Box::new(scheduler))
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
pub mod http_client;
|
||||
|
||||
#[cfg(target_feature = "atomics")]
|
||||
pub mod pool;
|
||||
#[cfg(target_feature = "atomics")]
|
||||
pub mod pool_schedule_method;
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
use std::borrow::BorrowMut;
|
||||
use std::future::Future;
|
||||
use std::sync::Mutex;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use js_sys::Promise;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user