#[doc(hidden)]pub fn run_on_worker<F, T>(f: F) -> Result<T, String>Expand description
Run a closure on the worker thread with proper cleanup on panic.
Returns Ok(T) on success, Err(String) if the closure panicked.
The caller handles the error (either tagged error value or Rf_errorcall).
Without the worker-thread feature, runs inline on the current thread.