Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(axevent_example): Return
Break
from signal handlers (#125)
Benefits include: - The signal handler is automatically unregistered and subsequent signals of the same type will cause the program to exit immediately. - The space of possible behaviors suggested by the code better match the space of actual behaviors; I can find no literature and come up with no experiment that causes the signal handler to be called twice even when the signal handler returns continue. Note however that: - If a task is already running, the signal handler will not run until it has returned. - If other tasks were already scheduled before the signal was received, these may still run before the main loop returns; I am unsure about the details. - Other sources are not automatically cleaned up; if the `SourceId` is kept then we can call `.remove()` on this to clean them up. --- `apps/axstorage_example/src/main.rs`: - Use `unix_signal_add_once` because it is more concise.
- Loading branch information