Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Event handler termination guarantee #98

Open
jklmnn opened this issue Sep 26, 2019 · 0 comments
Open

Event handler termination guarantee #98

jklmnn opened this issue Sep 26, 2019 · 0 comments

Comments

@jklmnn
Copy link
Member

jklmnn commented Sep 26, 2019

Since some platforms we are going to target in the future will employ cooperative multitasking we have to proof the termination of event handlers.
Currently we need to ensure that an event handler does not return until all work is done as it might not be called anymore otherwise.
Both properties cannot be proven at the same time since the last one includes cases where data arrives fast enough that the event handler will never reach the state to be finished..

The intended solution is to create an (arbitrary) upper limit for all procedures (that can possibly be used to detect progress) for their generated progress. The procedure will then signal that no progress can be made anymore and will cause the event handler to return. If more progress is available it will be handled in the next call of the event handler.
To protect deadlocks due to unhandled data the platform is responsible to check if data is available and call the event handler as long as this is true. Or to employ a busy loop and simply call all event handlers. The latter option is easier to implement but not recommended on platforms that are bound in electrical power.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant