emscripten-core / emscripten-core/emscripten
Calling a JS function from C++ with Thread
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
JS: Creating such a callback function at the top of my codes on the JS side.
```
function cb_Logging(text, verbosity) {
console.log(text);
}
```
C++(main.cpp): Running..
```
EM_ASM({
cb_Logging("Test", "Test");
});
```
C++(main.cpp): Not Runnig!
```
std::thread thread([&]{
EM_ASM({
cb_Logging("Test", "Test");
});
});
thread.join();
```
Please help me. I've been dealing with this for days.
Contributor guide
Assessment
This issue has not been assessed yet.