[MethodImpl(MethodImplOptions.NoInlining)] // the JITter can attempt to inline the caller itself without worrying about us private static JavaScriptStringEncoderOld CreateDefaultEncoderSlow() { var onDemandEncoder = new JavaScriptStringEncoderOld(); return(Interlocked.CompareExchange(ref _defaultEncoder, onDemandEncoder, null) ?? onDemandEncoder); }
[MethodImpl(MethodImplOptions.NoInlining)] // the JITter can attempt to inline the caller itself without worrying about us private static JavaScriptStringEncoderOld CreateDefaultEncoderSlow() { var onDemandEncoder = new JavaScriptStringEncoderOld(); return Interlocked.CompareExchange(ref _defaultEncoder, onDemandEncoder, null) ?? onDemandEncoder; }