-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels