Skip to content

Commit 05e5aa4

Browse files
committed
Remove XThread as obsolete
1 parent 1cdaadb commit 05e5aa4

File tree

15 files changed

+14
-131
lines changed

15 files changed

+14
-131
lines changed

src/DotNetty.Buffers/PoolThreadCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ namespace DotNetty.Buffers
66
using System;
77
using System.Diagnostics;
88
using System.Diagnostics.Contracts;
9+
using System.Threading;
910
using DotNetty.Common;
1011
using DotNetty.Common.Internal;
1112
using DotNetty.Common.Internal.Logging;
12-
using Thread = DotNetty.Common.Concurrency.XThread;
1313

1414
/// <summary>
1515
/// Acts a Thread cache for allocations. This implementation is moduled after

src/DotNetty.Common/Concurrency/AbstractEventExecutor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace DotNetty.Common.Concurrency
88
using System.Threading;
99
using System.Threading.Tasks;
1010
using DotNetty.Common.Internal.Logging;
11-
using Thread = XThread;
1211

1312
/// <summary>
1413
/// Abstract base class for <see cref="IEventExecutor" /> implementations

src/DotNetty.Common/Concurrency/IEventExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
namespace DotNetty.Common.Concurrency
55
{
6-
using Thread = DotNetty.Common.Concurrency.XThread;
7-
6+
using System.Threading;
7+
88
public interface IEventExecutor : IEventExecutorGroup
99
{
1010
/// <summary>

src/DotNetty.Common/Concurrency/SingleThreadEventExecutor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace DotNetty.Common.Concurrency
1212
using System.Threading.Tasks;
1313
using DotNetty.Common.Internal;
1414
using DotNetty.Common.Internal.Logging;
15-
using Thread = XThread;
1615

1716
/// <summary>
1817
/// <see cref="IEventExecutor"/> backed by a single thread.

src/DotNetty.Common/Concurrency/XThread.cs

Lines changed: 0 additions & 107 deletions
This file was deleted.

src/DotNetty.Common/ThreadDeathWatcher.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace DotNetty.Common
1010
using DotNetty.Common.Concurrency;
1111
using DotNetty.Common.Internal;
1212
using DotNetty.Common.Internal.Logging;
13-
using Thread = DotNetty.Common.Concurrency.XThread;
1413

1514
public static class ThreadDeathWatcher
1615
{

src/DotNetty.Common/ThreadLocalPool.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace DotNetty.Common
1010
using System.Diagnostics.Contracts;
1111
using System.Runtime.CompilerServices;
1212
using System.Threading;
13-
using Thread = DotNetty.Common.Concurrency.XThread;
1413

1514
public class ThreadLocalPool
1615
{

src/DotNetty.Common/Utilities/HashedWheelTimer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public sealed class HashedWheelTimer : ITimer
2727
const int InstanceCountLimit = 64;
2828

2929
readonly Worker worker;
30-
readonly XThread workerThread;
30+
readonly Thread workerThread;
3131
readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
3232

3333
const int WorkerStateInit = 0;
@@ -98,7 +98,7 @@ public HashedWheelTimer(
9898
tickInterval,
9999
long.MaxValue / this.wheel.Length));
100100
}
101-
this.workerThread = new XThread(st => this.worker.Run());
101+
this.workerThread = new Thread(st => this.worker.Run());
102102

103103
this.maxPendingTimeouts = maxPendingTimeouts;
104104

@@ -187,7 +187,7 @@ public async Task<ISet<ITimeout>> StopAsync()
187187
{
188188
GC.SuppressFinalize(this);
189189

190-
if (XThread.CurrentThread == this.workerThread)
190+
if (Thread.CurrentThread == this.workerThread)
191191
{
192192
throw new InvalidOperationException($"{nameof(HashedWheelTimer)}.stop() cannot be called from timer task.");
193193
}

src/DotNetty.Common/Utilities/ReferenceCountUtil.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace DotNetty.Common.Utilities
66
using System;
77
using System.Threading;
88
using DotNetty.Common.Internal.Logging;
9-
using Thread = DotNetty.Common.Concurrency.XThread;
109

1110
public static class ReferenceCountUtil
1211
{

src/DotNetty.Common/Utilities/ThreadExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace DotNetty.Common.Utilities
66
using System;
77
using System.Diagnostics.Contracts;
88
using System.Threading;
9-
using Thread = DotNetty.Common.Concurrency.XThread;
109

1110
public static class ThreadExtensions
1211
{

0 commit comments

Comments
 (0)