al_get_thread_should_stop(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… al_get_thread_should_stop β€” Allegro 5 API 🧡✨

okay bestie, so you're deep in allegro5 land, specifically the al_get_thread_should_stop part of the Allegro 5 API, and honestly? this one is a whole mood. it's the "hey girl, wrap it up" check for your threads. let's get into it 🫢


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_get_thread_should_stop(ALLEGRO_THREAD *thread)

🌸 DESCRIPTION 🌸

so like, this is your vibe check for threads. al_get_thread_should_stop checks if another thread is out here waiting for this thread to stop. πŸ›‘

if your thread is running in a loop β€” and let's be real, most of them are, that's their whole main character energy β€” you should call this periodically and act on it when it's convenient for you. no need to panic-exit mid-thought, just check in like a good friend and dip when the moment's right. πŸ’–

it returns true if another thread has called al_join_thread(3alleg5) or al_set_thread_should_stop(3alleg5) on this thread. that's it, that's the whole signal. it's giving "hey, someone wants you to wrap it up." πŸ‘‘

not me forgetting that this is literally just a check β€” you still gotta do the actual stopping yourself. it doesn't kill anything. it just tells you the group chat wants you to leave. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

Note: We don't support forceful killing of threads. πŸ’€ like, at all. no cap. you can't just yank a thread out of existence, that's not the vibe and it's not supported. cooperative stopping only, bestie. πŸŽ€

and that's the whole page, fr fr. this was pulled straight from the Allegro reference manual, al_get_thread_should_stop(3alleg5), section 3alleg5 β€” go forth and let your threads exit gracefully, you absolute icon πŸ‘‘πŸ’œβœ¨

πŸ“¦ where this page comes from