eclipse / mraa

Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
http://mraa.io
MIT License
1.38k stars 615 forks source link

gpio: Fix JS binding regarding interrupt injections #1102

Open jan-kiszka opened 1 year ago

jan-kiszka commented 1 year ago

According to https://github.com/libuv/libuv/discussions/3847 and based on stress tests, it is not correct to call uv_queue_work outside of the loop thread. We rather need to use the async API of libuv. That even simplifies things.

Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed" errors that were easy to trigger by multiple DIs being used in parallel. See also https://github.com/siemens/meta-iot2050/issues/386.

Set to draft status as more testing might still be needed, including at our users. But early feedback would definitely be welcome!

jan-kiszka commented 1 year ago

Looks good from out tests now.