Graceful quit SDL thread which is blocked in I/O in androi

  1. Android does not support Thread cancellation, hence i can not use thread cancellation.

Are there any quirk that i need to be aware of?.. The finest goal is to throw a thread out of the system gracefully in SDL.

Any light that can be shown on it ?

As Additional Information:

From Migration Notes of SDL 2

https://wiki.libsdl.org/MigrationGuide#Threads

" SDL_KillThread() is gone. It was never safe or reliable. The best replacement is to set a flag that tells a thread it should quit. That thread should check the flag with some frequency, and then the “killing” thread calls SDL_WaitThread() to clean up. "