harn-hostlib 0.10.166

Opt-in code-intelligence and deterministic-tool host builtins for the Harn VM
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Scoped parallelism shared by the code index's restore and compaction.
//!
//! Threads come from [`harn_parser::runtime_stack::scope`], which gives them
//! the runtime stack size every crate that can reach the parser must use.

pub(super) use harn_parser::runtime_stack::scope;

/// Join a scoped thread, re-raising its panic on the caller.
pub(super) fn joined<T>(handle: std::thread::ScopedJoinHandle<'_, T>) -> T {
    handle
        .join()
        .unwrap_or_else(|panic| std::panic::resume_unwind(panic))
}