v10.10.2024.0701 使用IJsonHost改进Json序列化
大石头 编写于 2024-07-01 08:36:34 大石头 提交于 2024-07-01 08:48:33
X
using System;
using System.Collections.Generic;

namespace System.Threading
{
	internal static class TimerManager
	{
		private static readonly Dictionary<Timer, object> s_rootedTimers = new();

		public static void Add(Timer timer)
		{
			lock (s_rootedTimers)
			{
                s_rootedTimers.Add(timer, null);
			}
		}

		public static void Remove(Timer timer)
		{
			lock (s_rootedTimers)
			{
                s_rootedTimers.Remove(timer);
			}
		}
	}
}