jonkeane commented on code in PR #49996:
URL: https://github.com/apache/arrow/pull/49996#discussion_r3273907715


##########
r/src/safe-call-into-r-impl.cpp:
##########
@@ -45,7 +45,16 @@ bool SetEnableSignalStopSource(bool enabled) {
 }
 
 // [[arrow::export]]
-bool CanRunWithCapturedR() { return MainRThread::GetInstance().Executor() == 
nullptr; }
+bool CanRunWithCapturedR() {
+#ifdef __EMSCRIPTEN__
+  // Threading is not supported under Emscripten/WASM. Always take the
+  // synchronous path to avoid attempting pthread_create which will fail
+  // with "thread constructor failed: Not supported".
+  return false;
+#else
+  return MainRThread::GetInstance().Executor() == nullptr;
+#endif

Review Comment:
   Is it possible to add a test (or maybe it's that we actually need to run the 
tests under wasm(???) to catch this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to