// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Core/Semaphore.h:31 ///
/// class Semaphore ///
///
/// /// /// Implements a semaphore /// When we switch to C++20 we can use counting_semaphore to unify this /// /// [InteropHandle] public readonly partial struct Semaphore : IDisposable { /// /// /// C++: /// Jolt/Core/Semaphore.h:35 ///
/// Semaphore() ///
///
/// /// /// Constructor /// /// public static Semaphore Create() => Jolt.PInvoke.Semaphore_Create(); /// /// /// C++: /// Jolt/Core/Semaphore.h:39 ///
/// void Release(uint inNumber = 1) ///
///
/// /// /// Release the semaphore, signaling the thread waiting on the barrier that there may be work /// /// public void Release(uint number) => Jolt.PInvoke.Semaphore_Release(this, number); /// /// /// C++: /// Jolt/Core/Semaphore.h:42 ///
/// void Acquire(uint inNumber = 1) ///
///
/// /// /// Acquire the semaphore inNumber times /// /// public void Acquire(uint number) => Jolt.PInvoke.Semaphore_Acquire(this, number); /// /// /// C++: /// Jolt/Core/Semaphore.h:45 ///
/// inline int GetValue() const ///
///
/// /// /// Get the current value of the semaphore /// /// public int GetValue() => Jolt.PInvoke.Semaphore_GetValue(this); public void Dispose() => Jolt.PInvoke.Semaphore_Destroy(this); } }