al_join_thread(3alleg5)

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

✨ al_join_thread(3alleg5) ✨

okay bestie, welcome to the Allegro 5 API reference manual πŸ’– this one's a lil function called al_join_thread, and ngl it's lowkey the "bestie come back, I need you" of the threading world 🫢


🌸 NAME 🌸

al_join_thread β€” Allegro 5 API


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

void al_join_thread(ALLEGRO_THREAD *thread, void **ret_value)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” this function waits for the thread to finish executing. Like, it's literally standing outside the bathroom door being like "you done yet?? πŸ‘€" until that thread is fully done-done.

and the way that it does this is by implicitly calling al_set_thread_should_stop(3alleg5) first 🫒 so it's not just waiting passively, it's politely (but firmly) telling the thread "hey bestie, wrap it up πŸ’…" before it starts waiting. periodt.

now, if ret_value is non-NULL, the value returned by the thread function will be stored at the location pointed to by ret_value 🌟 like the thread's lil final gift to you, hand-delivered to wherever you told it to put it. if ret_value is NULL, then no cap, you just don't get the return value β€” that's the vibe.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie, no crumbs left πŸ“ this was served fresh from the Allegro reference manual β€” Allegro 5 edition, al_join_thread(3alleg5) era πŸ’œ go forth and join your threads, icon ✨🧚

πŸ“¦ where this page comes from