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

◆ AllocateNativeOverlapped() [3/3]

unsafe NativeOverlapped * System.Threading.ThreadPoolBoundHandle.AllocateNativeOverlapped ( PreAllocatedOverlapped preAllocated)
inline

Definition at line 56 of file ThreadPoolBoundHandle.cs.

57 {
58 if (preAllocated == null)
59 {
60 throw new ArgumentNullException("preAllocated");
61 }
63 preAllocated.AddRef();
64 try
65 {
66 ThreadPoolBoundHandleOverlapped overlapped = preAllocated._overlapped;
67 if (overlapped._boundHandle != null)
68 {
69 throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, "preAllocated");
70 }
71 overlapped._boundHandle = this;
72 return overlapped._nativeOverlapped;
73 }
74 catch
75 {
76 preAllocated.Release();
77 throw;
78 }
79 }

References System.Threading.ThreadPoolBoundHandleOverlapped._boundHandle, System.Threading.ThreadPoolBoundHandleOverlapped._nativeOverlapped, System.Threading.PreAllocatedOverlapped._overlapped, System.Threading.PreAllocatedOverlapped.AddRef(), System.SR.Argument_PreAllocatedAlreadyAllocated, System.Threading.ThreadPoolBoundHandle.EnsureNotDisposed(), and System.Threading.PreAllocatedOverlapped.Release().