Helo,
When I try creating threads in CPP, creating a wheel and importing in pyodide 0.21.0, I get this:
index.js:1 CppException std::__2::system_error: thread constructor failed: Resource temporarily unavailable
This is the program:
void run_threads() {
std::thread t([&](){
for (int i = 0; i < 10; i++) {
std::cout << "i:" << i << std::endl;
}
});
std::thread t2([&](){
for (int j = 10; j < 20; j++) {
std::cout << "j:" << j << std::endl;
}
});
t.join();
t2.join();
}
PYBIND11_MODULE(example, m){
m.def("run_threads", &run_threads, "Run threads");
}
I know there are some issues with running multithreaded code, is there any way I can make this work?
Thanks!
Helo,
When I try creating threads in CPP, creating a wheel and importing in pyodide 0.21.0, I get this:
index.js:1 CppException std::__2::system_error: thread constructor failed: Resource temporarily unavailable
This is the program:
I know there are some issues with running multithreaded code, is there any way I can make this work?
Thanks!