Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Semaphore() [3/4]

System.Threading.Semaphore.Semaphore ( int initialCount,
int maximumCount,
string? name,
out bool createdNew )
inline

Definition at line 21 of file Semaphore.cs.

22 {
23 if (initialCount < 0)
24 {
25 throw new ArgumentOutOfRangeException("initialCount", SR.ArgumentOutOfRange_NeedNonNegNum);
26 }
27 if (maximumCount < 1)
28 {
29 throw new ArgumentOutOfRangeException("maximumCount", SR.ArgumentOutOfRange_NeedPosNum);
30 }
31 if (initialCount > maximumCount)
32 {
33 throw new ArgumentException(SR.Argument_SemaphoreInitialMaximum);
34 }
35 CreateSemaphoreCore(initialCount, maximumCount, name, out createdNew);
36 }
void CreateSemaphoreCore(int initialCount, int maximumCount, string name, out bool createdNew)
Definition Semaphore.cs:76

References System.SR.Argument_SemaphoreInitialMaximum, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_NeedPosNum, and System.Threading.Semaphore.CreateSemaphoreCore().