mln-rs-runtime 0.0.20

Part of mln-rs, a Rust port of the MapLibre Native map rendering core. Depend on mln-rs instead.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Settings for the test tools (`tools/render-test`) that no host has a use
//! for. Built only with the `testing` feature, and hidden from the
//! documentation: they aren't API.

use std::sync::atomic::Ordering;

use crate::Runtime;

/// Puts the tile workers of the renderers that `runtime`'s render sessions
/// make from now on in `instances` worker instances, which the renderer
/// reaches only through the worker codec, as the browser build's Web
/// Workers are: every job, bucket and tile crosses as bytes. 0 runs them on
/// the runtime's pool again. A session that is attached keeps its workers.
pub fn set_tile_worker_codec(runtime: &Runtime, instances: usize) {
    runtime.shared.tile_worker_instances.store(instances, Ordering::SeqCst);
}