SDL_SignalAsyncIOQueue(3)
π SDL_SignalAsyncIOQueue π
okay bestie, welcome to the SDL_SignalAsyncIOQueue(3) page β a lil' function from the SDL3 FUNCTIONS fam that is genuinely the friend who texts "you up?" to wake everybody out of a nap π
β¨ NAME β¨
SDL_SignalAsyncIOQueue β wake up any threads that are blocking in SDL_WaitAsyncIOResult().
like, it's giving alarm clock energy, no cap β°π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_asyncio.h>
void SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue);
πΈ DESCRIPTION πΈ
So here's the vibe: this will unblock any threads that are sleeping in a call to SDL_WaitAsyncIOResult for the specified queue, and cause them to return from that function. literally waking them up mid-nap π«Ά
It's highkey useful when you're destroying a queue and you need to make sure nothing is touching it indefinitely. In this case, once this call completes, the caller should take measures to make sure any previously-blocked threads have returned from their wait and will not touch the queue again β perhaps by setting a flag to tell the threads to terminate and then using SDL_WaitThread() to make sure they've done so. (yes bestie, the flag + SDL_WaitThread() combo is the main character move here π)
β οΈ careful queen: after you signal, the threads might not have actually come back yet. Do the flag thing and the SDL_WaitThread() thing before you go touching that queue again, fr fr. π
π FUNCTION PARAMETERS π
queueβ the async I/O task queue to signal. that's the one getting the wake-up call πβ¨
π§ THREAD SAFETY π§
It is safe to call this function from any thread. periodt. π
π AVAILABILITY π
This function is available since SDL 3.2.0. π
β SEE ALSO β
SDL_WaitAsyncIOResult(3)β the function whose sleepy lil threads you're waking up π΄β‘οΈπ³
Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_SignalAsyncIOQueue(3)
okay that's the whole page bestie, go signal your queues and slay πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms