You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Core/Groups/GroupCompound.cs
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,10 @@ public abstract class GroupCompound<G1, G2, G3, G4>: ITouchedByReflection
27
27
{
28
28
staticGroupCompound()
29
29
{
30
-
//avoid race conditions if compounds are using on multiple thread
30
+
//avoid race conditions if compounds are using on multiple thread. This shouldn't be necessary though since c# static constructors are guaranteed to be thread safe!
31
+
/// c# Static constructors are guaranteed to be thread safe
32
+
/// The runtime guarantees that a static constructor is only called once. So even if a type is called by multiple threads at the same time,
33
+
/// the static constructor is always executed one time. To get a better understanding how this works, it helps to know what purpose it serves.
0 commit comments