The text was updated successfully, but these errors were encountered:
deshan
changed the title
Thread-safe Functions wired issue on windows, not on linux or mac
Thread-safe Functions weird issue on windows, not on linux or mac
Aug 5, 2020
I'm also running into this issue with an Electron (version 9.1.2) app on Windows. I have a C++ module running some async processes. My JS code registers a callback function so it can be notified when the native code state changes. On the C++ side this is done with a ThreadSafeFunction. I haven't had any problems in macOS, but the JS callback is unreliable on Windows. Incidentally I am also using React (and Redux).
The behavior I'm seeing is similar to #622. It seems that ThreadSafeFunction calls sometimes queue up and don't get processed for a long time. Eventually, and seemingly at random, a new ThreadSafeFunction call will break the logjam, and all previously queued TheadSafeFunction calls will be processed.
The challenge on the N-API team side is that seems to be related to react and I don't think any of our team members are that familiar with it. Opening an issue in the electron or react repos might make sense to see if anybody has come across the same issue/resolved in those repos.
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
Hi,
I'm trying a simple Thread-safe Function example,
https://napi.inspiredware.com/special-topics/thread-safe-functions.html
This example works as expected in mac and Linux platforms. But not in windows.
App config
Electron app with React and webpack.
Problem
jsCallback.Callnot gets called sometimes.
Works ok on windows when
Does not work on windows when
Run inside a react js code in an Electron app
I'm using native-ext-loader (https://www.npmjs.com/package/native-ext-loader) to load the native node module in webpack rules.
The text was updated successfully, but these errors were encountered: