pub fn current_process() -> Option<ProcessId>Expand description
B-runtime Task 6 review fix r1 (RT-078): the read-only, cross-crate
half of the same [CURRENT_PROCESS] ambient-state bridge
real_nba_enqueue already uses to attribute an NBA write to a real
ProcessId despite the frozen ProcessFn ABI carrying none.
vj_runtime::random_sink’s $random/$urandom/$urandom_range
sink has the identical problem – their ABI symbols
(vj_codegen::expr::SV_RT_RANDOM_SYMBOL et al.) are genuinely
zero-argument (no SimHandle, no ProcessId; see that module’s own doc
comment for why), so this is the one already-live ambient hook that can
supply a real per-process identity to key a seed store by. Returns
None outside of any ResumeDriver::resume_for/start dispatch
(exactly with_current_process’s own “not currently installed” case) –
callers key an isolated fallback slot for that case, never conflating it
with a real ProcessId.