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

◆ EnsureInitialized< T >() [1/3]

static T System.Threading.LazyInitializer.EnsureInitialized< T > ( [AllowNull] ref T target,
ref bool initialized,
[NotNullIfNotNull("syncLock")] ref object? syncLock,
Func< T > valueFactory )
inlinestatic

Definition at line 70 of file LazyInitializer.cs.

71 {
72 if (Volatile.Read(ref initialized))
73 {
74 return target;
75 }
76 return EnsureInitializedCore(ref target, ref initialized, ref syncLock, valueFactory);
77 }

References System.Threading.Volatile.Read().