al_create_thr...with_stacksize(3alleg5)

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

πŸ’– al_create_thread_with_stacksize β€” Allegro 5 API πŸ’–

ok so bestie, we're in the Allegro reference manual and today's main character is al_create_thread_with_stacksize from the Allegro 5 API. she's a thread-spawner with opinions about stack size and honestly? iconic. 🧡✨


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_THREAD *al_create_thread_with_stacksize(
   void *(*proc)(ALLEGRO_THREAD *thread, void *arg), void *arg, size_t stacksize)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you spawn a brand new thread, and you get to tell it exactly how big its stack is β€” that's the stacksize, and it's measured in bytes btw, not vibes. that fresh little thread starts off running proc, and it gets handed two things: its very own thread handle, plus the value arg. like a lil starter pack πŸŽ€

if everything goes right, you get back a pointer to the thread. slay. 🫢

if something goes wrong? you get NULL. that's it. that's the whole error report. no extra lore. πŸ’€


⭐ SINCE ⭐

5.2.5 β€” she's not old, she's vintage. 🌈

[Unstable API]: this is a new API, and the docs are literally saying they may want a better way to specify thread options. so like... it works, but don't get too attached to the interface, bestie. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page fr fr πŸ’… β€” brought to you by the Allegro reference manual, filed under al_create_thr...with_stacksize(3alleg5). go forth and spawn responsibly, bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from