Within my android_main
, I make a call to ALooper_pollAll
with a negative timeout value so that it waits indefinitely until an event appears. However there are cases when I need to be able to manually exit this blocked state (without having to wait for an event to occur).
To try and achieve this, I have tried calling the following from a different thread, while ALooper_pollAll
is waiting for an event:
ALooper_wake( ALooper_forThread() )
however this results in a segmentation fault.
Is there a way I can manually unblock ALooper_pollAll
before the timeout expires?