From 275afff5f9af7fd4d92037f7d0d9540e79b87b08 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 16 Apr 2024 18:43:23 +0200 Subject: [PATCH] Remove deprecated ThreadNotification (#2051) --- csharp/src/Ice/Instance.cs | 11 ----------- csharp/src/Ice/ThreadHookPlugin.cs | 12 ------------ csharp/src/Ice/Util.cs | 28 ---------------------------- 3 files changed, 51 deletions(-) diff --git a/csharp/src/Ice/Instance.cs b/csharp/src/Ice/Instance.cs index 5659d92d135..82aa29bb735 100644 --- a/csharp/src/Ice/Instance.cs +++ b/csharp/src/Ice/Instance.cs @@ -999,17 +999,6 @@ internal void initialize(Ice.Communicator communicator, Ice.InitializationData i { AssemblyUtil.preloadAssemblies(); } - -#pragma warning disable 618 - if (_initData.threadStart == null && _initData.threadHook != null) - { - _initData.threadStart = _initData.threadHook.start; - } - if (_initData.threadStop == null && _initData.threadHook != null) - { - _initData.threadStop = _initData.threadHook.stop; - } -#pragma warning restore 618 } catch (Ice.LocalException) { diff --git a/csharp/src/Ice/ThreadHookPlugin.cs b/csharp/src/Ice/ThreadHookPlugin.cs index d21289afa2c..e8260def8ee 100644 --- a/csharp/src/Ice/ThreadHookPlugin.cs +++ b/csharp/src/Ice/ThreadHookPlugin.cs @@ -10,18 +10,6 @@ namespace Ice; /// public class ThreadHookPlugin : Plugin { - /// - /// Installs a thread hook for a communicator. - /// - /// The communicator using the thread notification hook. - /// The thread notification hook for the communicator. - [Obsolete("This constructor is deprecated. Use the constructor with threadStart and threadStop parameters instead.")] - public - ThreadHookPlugin(Communicator communicator, ThreadNotification threadHook) : - this(communicator, threadHook.start, threadHook.stop) - { - } - /// /// Installs thread hooks for a communicator. /// diff --git a/csharp/src/Ice/Util.cs b/csharp/src/Ice/Util.cs index 861ea480f5a..c23d04e301b 100644 --- a/csharp/src/Ice/Util.cs +++ b/csharp/src/Ice/Util.cs @@ -6,28 +6,6 @@ namespace Ice { - /// - /// Interface for thread notification hooks. Applications can derive - /// a class tat implements the start and stop - /// methods to intercept creation and destruction of threads created - /// by the Ice run time. - /// - public interface ThreadNotification - { - /// - /// The Ice run time calls start for each new - /// thread it creates. The call is made by the newly-started thread. - /// - void start(); - - /// - /// The Ice run time calls stop before it destroys - /// a thread. The call is made by thread that is about to be - /// destroyed. - /// - void stop(); - } - /// /// A class that encapsulates data to initialize a communicator. /// @@ -59,12 +37,6 @@ public object Clone() /// public Instrumentation.CommunicatorObserver observer; - /// - /// The thread hook for the communicator. - /// - [Obsolete("This data member is deprecated. Use threadStart or threadStop instead.")] - public ThreadNotification threadHook; - /// /// The thread start hook for the communicator. The Ice run time /// calls this hook for each new thread it creates. The call is