SDL_ThreadPriority(3type)
π SDL_ThreadPriority π
ok so bestie, welcome to the SDL3 DATATYPES corner of the manual β this one's about SDL_ThreadPriority, the enum that tells SDL how much of a main character your thread is. π
β¨ NAME β¨
SDL_ThreadPriority β literally just, the SDL thread priority. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_thread.h>
typedef enum SDL_ThreadPriority {
SDL_THREAD_PRIORITY_LOW,
SDL_THREAD_PRIORITY_NORMAL,
SDL_THREAD_PRIORITY_HIGH,
SDL_THREAD_PRIORITY_TIME_CRITICAL
} SDL_ThreadPriority;
so it's an enum, it lives in SDL_thread.h, and it has four whole moods. we love a four-mood icon. β¨
π¦ DESCRIPTION π¦
ok so here's the tea: SDL will make system changes as necessary in order to apply the thread priority. like, it's not just gonna sit there and politely ask β it'll actually go mess with system stuff to make it happen. π₯
which means!! if your code is out here trying to control thread state related to priority, you gotta be aware that calling SDL_SetCurrentThreadPriority may alter such state. no cap. it can lowkey change things under you. π
and if you wanna control aspects of this behavior? there's SDL_HINT_THREAD_PRIORITY_POLICY for that. use it, bestie, it's giving control freak in the best way. π
π AVAILABILITY π
This enum is available since SDL 3.2.0. she's not brand new but she's still fresh. π«Ά
and that's the whole page, bestie!! slay. this one came to you courtesy of Simple Directmedia Layer, SDL 3.4.18, page SDL_ThreadPriority(3type) β tysm for reading, ily, go set some priorities responsibly πβ¨ππ¦πΈ
π¦ 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