[ion] Introduce Ion::Events::None

Which allows Ion::Events::getEvent to be non-blocking

Change-Id: I2715b10ace2ecbac153b0f7d00ea5f2ca5de399c
This commit is contained in:
Romain Goyet
2016-11-11 15:32:26 +01:00
parent 5a03f8fd03
commit f5ea9cb2d3
3 changed files with 9 additions and 5 deletions

View File

@@ -37,6 +37,9 @@ void Container::run() {
void Container::step() {
Ion::Events::Event event = Ion::Events::getEvent(); // This is a blocking call
if (event == Ion::Events::None) {
return;
}
if (handleEvent(event)) {
return;
}