diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs index bd622d9f69401b..e259f3854015eb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/WaitSubsystem.Unix.cs @@ -424,10 +424,5 @@ public static void Interrupt(Thread thread) s_lock.Release(); } } - - public static void OnThreadExiting(Thread thread) - { - thread.WaitInfo.OnThreadExiting(); - } } } diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs index c1978eab5f1114..2c7c0400c63fc9 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs @@ -82,7 +82,7 @@ private Thread() ~Thread() { #if TARGET_UNIX || TARGET_BROWSER - WaitSubsystem.OnThreadExiting(this); + _waitInfo?.OnThreadExiting(); #endif FreeInternal(); }