File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Servers/Kestrel/Transport.Sockets/src/Internal Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 8
8
9
9
namespace Microsoft . AspNetCore . Server . Kestrel . Transport . Sockets . Internal
10
10
{
11
- public class IOQueue : PipeScheduler
11
+ public class IOQueue : PipeScheduler , IThreadPoolWorkItem
12
12
{
13
- private static readonly WaitCallback _doWorkCallback = s => ( ( IOQueue ) s ) . DoWork ( ) ;
14
-
15
13
private readonly object _workSync = new object ( ) ;
16
14
private readonly ConcurrentQueue < Work > _workItems = new ConcurrentQueue < Work > ( ) ;
17
15
private bool _doingWork ;
@@ -30,13 +28,13 @@ public override void Schedule(Action<object> action, object state)
30
28
{
31
29
if ( ! _doingWork )
32
30
{
33
- System . Threading . ThreadPool . UnsafeQueueUserWorkItem ( _doWorkCallback , this ) ;
31
+ System . Threading . ThreadPool . UnsafeQueueUserWorkItem ( this , preferLocal : false ) ;
34
32
_doingWork = true ;
35
33
}
36
34
}
37
35
}
38
36
39
- private void DoWork ( )
37
+ void IThreadPoolWorkItem . Execute ( )
40
38
{
41
39
while ( true )
42
40
{
You can’t perform that action at this time.
0 commit comments