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

◆ Create()

void System.Threading.LowLevelLifoSemaphore.Create ( int maximumSignalCount)
inlineprivate

Definition at line 315 of file LowLevelLifoSemaphore.cs.

316 {
317 _completionPort = Interop.Kernel32.CreateIoCompletionPort(new IntPtr(-1), IntPtr.Zero, UIntPtr.Zero, maximumSignalCount);
318 if (_completionPort == IntPtr.Zero)
319 {
320 int lastPInvokeError = Marshal.GetLastPInvokeError();
321 OutOfMemoryException ex = new OutOfMemoryException();
322 ex.HResult = lastPInvokeError;
323 throw ex;
324 }
325 }
static IntPtr CreateIoCompletionPort(IntPtr FileHandle, IntPtr ExistingCompletionPort, UIntPtr CompletionKey, int NumberOfConcurrentThreads)

References System.Threading.LowLevelLifoSemaphore._completionPort, Interop.Kernel32.CreateIoCompletionPort(), System.Runtime.InteropServices.Marshal.GetLastPInvokeError(), System.IntPtr.Zero, and System.UIntPtr.Zero.

Referenced by System.Threading.LowLevelLifoSemaphore.LowLevelLifoSemaphore().