0

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?

Volo
  • 28,673
  • 12
  • 97
  • 125
lost_bits1110
  • 2,380
  • 6
  • 33
  • 44

1 Answers1

1

Sorry - my approach worked afterall, I was simply getting the handle to my ALooper from the wrong thread. Thanks!

lost_bits1110
  • 2,380
  • 6
  • 33
  • 44