Closed liamwhite closed 1 year ago
as opposed to ...
appletGetMessage can already be used for custom event loop
- not sure why exposing the Event is needed?
presumably to wait for message to become available. appletGetMessage waits with timeout zero, so you end up wasting cpu time if you loop calling it.
@yellows8 To allow including the event in a call to waitMulti(&idx, -1, waiterForEvent(appletMessageEvent))
, along with other events. As SciresM noted, if you call appletGetMessage, it does not wait for a message to become available and returns immediately if there is no message.
This allows waiting for applet messages using a custom event loop (as opposed to using appletMainLoop).