Sha256: ff84929de27a848e5b155549caa96db5db5f030afca975f8ba3f3da640083001

Contents?: true

Size: 351 Bytes

Versions: 38

Compression:

Stored size: 351 Bytes

Contents

fn main() {
    let cell = once_cell::sync::OnceCell::<u32>::new();
    cell.get_or_init(|| {
        cell.get_or_init(|| 1);
        2
    });
}

/// Dummy test to make it seem hang when compiled as `--test`
/// See https://github.com/matklad/once_cell/issues/79
#[test]
fn dummy_test() {
    std::thread::sleep(std::time::Duration::from_secs(4));
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/once_cell-1.20.2/examples/reentrant_init_deadlocks.rs
wasmtime-28.0.0 ./ext/cargo-vendor/once_cell-1.20.2/examples/reentrant_init_deadlocks.rs
wasmtime-27.0.0 ./ext/cargo-vendor/once_cell-1.20.2/examples/reentrant_init_deadlocks.rs
wasmtime-26.0.0 ./ext/cargo-vendor/once_cell-1.20.2/examples/reentrant_init_deadlocks.rs
wasmtime-25.0.2 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-25.0.1 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-25.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-24.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-23.0.2 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-22.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-21.0.1 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-20.0.2 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-20.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-18.0.3 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-17.0.1 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-17.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-16.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-15.0.1 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-15.0.0 ./ext/cargo-vendor/once_cell-1.19.0/examples/reentrant_init_deadlocks.rs
wasmtime-14.0.4 ./ext/cargo-vendor/once_cell-1.18.0/examples/reentrant_init_deadlocks.rs