From aa76f679147647ba2ddb42adff94bddb4a82d5d9 Mon Sep 17 00:00:00 2001 From: cgmossa Date: Sun, 21 Jan 2024 15:40:22 +0100 Subject: [PATCH] task: add single_threaded everywhere --- extendr-api/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extendr-api/src/lib.rs b/extendr-api/src/lib.rs index c2241b71df..02d863b6f1 100644 --- a/extendr-api/src/lib.rs +++ b/extendr-api/src/lib.rs @@ -481,6 +481,7 @@ pub unsafe fn register_call_methods(info: *mut libR_sys::DllInfo, metadata: Meta numArgs: 0, }); + single_threaded(|| { libR_sys::R_registerRoutines( info, std::ptr::null(), @@ -492,6 +493,7 @@ pub unsafe fn register_call_methods(info: *mut libR_sys::DllInfo, metadata: Meta // This seems to allow both symbols and strings, libR_sys::R_useDynamicSymbols(info, 0); libR_sys::R_forceSymbols(info, 0); + }) } /// Type of R objects used by [Robj::rtype].