pub struct SDL_Semaphore { /* private fields */ }Expand description
A means to manage access to a resource, by count, between threads.
Semaphores (specifically, “counting semaphores”), let X number of threads request access at the same time, each thread granted access decrementing a counter. When the counter reaches zero, future requests block until a prior thread releases their request, incrementing the counter again.
Wikipedia has a thorough explanation of the concept:
https://en.wikipedia.org/wiki/Semaphore_(programming)
§Availability
This struct is available since SDL 3.2.0.
Auto Trait Implementations§
impl Freeze for SDL_Semaphore
impl RefUnwindSafe for SDL_Semaphore
impl Send for SDL_Semaphore
impl Sync for SDL_Semaphore
impl Unpin for SDL_Semaphore
impl UnsafeUnpin for SDL_Semaphore
impl UnwindSafe for SDL_Semaphore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more