bool al_get_thread_should_stop(ALLEGRO_THREAD *thread)
Introduced in 5.0.0

Check if another thread is waiting for thread to stop. Threads which run in a loop should check this periodically and act on it when convenient.

Returns true if another thread has called al_join_thread or al_set_thread_should_stop on this thread.

See also: al_join_thread, al_set_thread_should_stop.

Note: We don't support forceful killing of threads.

Examples: ex_threads2

Most helpful discussions: