You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GPIO IRQs registered via "gpio.irq(callback[, event])" are executed as they arrive, interrupting the currently running program. Normally, JavaScript environments are of cooperative nature and schedule events in the event loop where they will be executed when the current task completes.
Further, using IRQs leads to a complete crash / hang, even in simple use cases. Most likely as things are not reentrant / thread safe.
Ignoring that this currently crashes, is it expected to behave like this? If yes, it should be mentioned in the documentation, also pointing out potential risks. If not, I would be happy to provide a PR.
If it is about speed, than at least it should run in an isolated JS context and communicate via messages, like a JS worker.
The text was updated successfully, but these errors were encountered:
GPIO IRQs registered via "gpio.irq(callback[, event])" are executed as they arrive, interrupting the currently running program. Normally, JavaScript environments are of cooperative nature and schedule events in the event loop where they will be executed when the current task completes.
Further, using IRQs leads to a complete crash / hang, even in simple use cases. Most likely as things are not reentrant / thread safe.
Ignoring that this currently crashes, is it expected to behave like this? If yes, it should be mentioned in the documentation, also pointing out potential risks. If not, I would be happy to provide a PR.
If it is about speed, than at least it should run in an isolated JS context and communicate via messages, like a JS worker.
The text was updated successfully, but these errors were encountered: