4 types derived from PipeScheduler
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\Transport.Sockets\src\Internal\IOQueue.cs (1)
11internal sealed class IOQueue : PipeScheduler, IThreadPoolWorkItem
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\IOQueue.cs (1)
11internal sealed class IOQueue : PipeScheduler, IThreadPoolWorkItem
System.IO.Pipelines (2)
System\IO\Pipelines\InlineScheduler.cs (1)
6internal sealed class InlineScheduler : PipeScheduler
System\IO\Pipelines\ThreadPoolScheduler.netcoreapp.cs (1)
9internal sealed class ThreadPoolScheduler : PipeScheduler
189 references to PipeScheduler
ClientSample (6)
Tcp\SocketAwaitable.cs (2)
20private readonly PipeScheduler _ioScheduler; 26public SocketAwaitable(PipeScheduler ioScheduler)
Tcp\SocketReceiver.cs (1)
18public SocketReceiver(Socket socket, PipeScheduler scheduler)
Tcp\SocketSender.cs (1)
23public SocketSender(Socket socket, PipeScheduler scheduler)
Tcp\TcpConnection.cs (2)
32_sender = new SocketSender(_socket, PipeScheduler.ThreadPool); 33_receiver = new SocketReceiver(_socket, PipeScheduler.ThreadPool);
InMemory.FunctionalTests (16)
Http2\Http2TestBase.cs (5)
393Scheduler = PipeScheduler.Inline, 455var inputPipeOptions = GetInputPipeOptions(_serviceContext, _memoryPool, PipeScheduler.ThreadPool); 456var outputPipeOptions = GetOutputPipeOptions(_serviceContext, _memoryPool, PipeScheduler.ThreadPool); 1378private static PipeOptions GetInputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler writerScheduler) => new PipeOptions 1389private static PipeOptions GetOutputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler readerScheduler) => new PipeOptions
Http3\Http3TestBase.cs (1)
123Scheduler = PipeScheduler.Inline,
KeepAliveTimeoutTests.cs (1)
218context.Scheduler = PipeScheduler.Inline;
RequestHeadersTimeoutTests.cs (1)
131context.Scheduler = PipeScheduler.Inline;
RequestTests.cs (1)
1265Scheduler = PipeScheduler.Inline
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (4)
358public static PipeOptions GetInputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler writerScheduler) => new PipeOptions 369public static PipeOptions GetOutputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler readerScheduler) => new PipeOptions 1119var inputOptions = Http3InMemory.GetInputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool); 1120var outputOptions = Http3InMemory.GetOutputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool);
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
26PipeScheduler scheduler = null,
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
54Scheduler = PipeScheduler.ThreadPool;
TestTransport\InMemoryTransportConnection.cs (1)
24public InMemoryTransportConnection(MemoryPool<byte> memoryPool, ILogger logger, PipeScheduler scheduler = null)
Microsoft.AspNetCore.Http.Connections (2)
HttpConnectionDispatcherOptions.cs (2)
140internal PipeOptions TransportPipeOptions => _transportPipeOptions ??= new PipeOptions(pauseWriterThreshold: TransportMaxBufferSize, resumeWriterThreshold: TransportMaxBufferSize / 2, readerScheduler: PipeScheduler.ThreadPool, useSynchronizationContext: false); 142internal PipeOptions AppPipeOptions => _appPipeOptions ??= new PipeOptions(pauseWriterThreshold: ApplicationMaxBufferSize, resumeWriterThreshold: ApplicationMaxBufferSize / 2, readerScheduler: PipeScheduler.ThreadPool, useSynchronizationContext: false);
Microsoft.AspNetCore.Http.Connections.Client (4)
HttpConnectionOptions.cs (2)
125internal PipeOptions TransportPipeOptions => _transportPipeOptions ??= new PipeOptions(pauseWriterThreshold: TransportMaxBufferSize, resumeWriterThreshold: TransportMaxBufferSize / 2, readerScheduler: PipeScheduler.ThreadPool, useSynchronizationContext: false); 127internal PipeOptions AppPipeOptions => _appPipeOptions ??= new PipeOptions(pauseWriterThreshold: ApplicationMaxBufferSize, resumeWriterThreshold: ApplicationMaxBufferSize / 2, readerScheduler: PipeScheduler.ThreadPool, useSynchronizationContext: false);
Internal\ClientPipeOptions.cs (2)
10public static PipeOptions DefaultOptions = new PipeOptions(writerScheduler: PipeScheduler.ThreadPool, readerScheduler: PipeScheduler.ThreadPool, useSynchronizationContext: false);
Microsoft.AspNetCore.Http.Connections.Tests (2)
ServerSentEventsTests.cs (2)
66var pair = DuplexPipe.CreateConnectionPair(PipeOptions.Default, new PipeOptions(readerScheduler: PipeScheduler.Inline)); 88var pair = DuplexPipe.CreateConnectionPair(PipeOptions.Default, new PipeOptions(readerScheduler: PipeScheduler.Inline));
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.cs (2)
303readerScheduler: PipeScheduler.Inline, 493_bodyInputPipe = new Pipe(new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.ThreadPool, minimumSegmentSize: MinAllocBufferSize));
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
519writerScheduler: PipeScheduler.Inline,
Internal\Http2\Http2Connection.cs (2)
172_scheduleInline = context.ServiceContext.Scheduler == PipeScheduler.Inline; 1754writerScheduler: PipeScheduler.Inline,
Internal\Http2\Http2FrameWriter.cs (1)
118_scheduleInline = serviceContext.Scheduler == PipeScheduler.Inline;
Internal\Http2\Http2OutputProducer.cs (3)
59var scheduleInline = context.ServiceContext.Scheduler == PipeScheduler.Inline; 761readerScheduler: PipeScheduler.Inline, 762writerScheduler: PipeScheduler.ThreadPool,
Internal\Http2\Http2Stream.cs (1)
639writerScheduler: PipeScheduler.Inline,
Internal\Http3\Http3OutputProducer.cs (2)
465readerScheduler: PipeScheduler.Inline, 466writerScheduler: PipeScheduler.ThreadPool,
Internal\Http3\Http3Stream.cs (1)
1176writerScheduler: PipeScheduler.Inline,
Internal\KestrelServerImpl.cs (1)
98Scheduler = PipeScheduler.ThreadPool,
Internal\ServiceContext.cs (1)
20public PipeScheduler Scheduler { get; set; } = default!;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (39)
Http1\Http1ConnectionTestsBase.cs (3)
35var options = new PipeOptions(_pipelineFactory, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false); 46Scheduler = PipeScheduler.Inline
Http1\Http1OutputProducerTests.cs (14)
38readerScheduler: Mock.Of<PipeScheduler>(), 39writerScheduler: PipeScheduler.Inline, 63readerScheduler: Mock.Of<PipeScheduler>(), 64writerScheduler: PipeScheduler.Inline, 91readerScheduler: Mock.Of<PipeScheduler>(), 92writerScheduler: PipeScheduler.Inline, 142readerScheduler: Mock.Of<PipeScheduler>(), 143writerScheduler: PipeScheduler.Inline, 162readerScheduler: Mock.Of<PipeScheduler>(), 163writerScheduler: PipeScheduler.Inline, 182readerScheduler: Mock.Of<PipeScheduler>(), 183writerScheduler: PipeScheduler.Inline, 204readerScheduler: Mock.Of<PipeScheduler>(), 205writerScheduler: PipeScheduler.Inline,
Http2\Http2FrameWriterTests.cs (6)
38var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline)); 60var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline)); 76var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline));
Http3\Http3FrameWriterTests.cs (6)
41var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline)); 55var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline)); 74var pipe = new Pipe(new PipeOptions(_dirtyMemoryPool, PipeScheduler.Inline, PipeScheduler.Inline));
HttpResponseHeadersTests.cs (2)
29var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
PipelineExtensionTests.cs (2)
24_pipe = new Pipe(new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false));
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
26PipeScheduler scheduler = null,
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
54Scheduler = PipeScheduler.ThreadPool;
StartLineTests.cs (2)
519var options = new PipeOptions(MemoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
TestHelpers\TestInput.cs (2)
28var options = new PipeOptions(pool: _memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (39)
HeaderCollectionBenchmark.cs (2)
328var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http1ConnectionBenchmark.cs (2)
31var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http1ConnectionParsingOverheadBenchmark.cs (2)
27var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http1ReadingBenchmark.cs (2)
96var options = new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http1WritingBenchmark.cs (2)
101var options = new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http2\Http2ConnectionBenchmarkBase.cs (2)
47var options = new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Http2\Http2FrameWriterBenchmark.cs (2)
29var options = new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
HttpProtocolFeatureCollection.cs (2)
230var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
RequestParsingBenchmark.cs (2)
28var options = new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
ResponseHeaderCollectionBenchmark.cs (2)
176var options = new PipeOptions(memoryPool, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
SchedulerBenchmark.cs (14)
22private PipeScheduler[] _ioQueueSchedulers; 23private PipeScheduler[] _threadPoolSchedulers; 24private PipeScheduler[] _inlineSchedulers; 30private Func<int, ParallelLoopState, PipeScheduler[], PipeScheduler[]> _parallelAction; 39_inlineSchedulers = new PipeScheduler[IOQueueCount]; 42_inlineSchedulers[i] = PipeScheduler.Inline; 45_threadPoolSchedulers = new PipeScheduler[IOQueueCount]; 48_threadPoolSchedulers[i] = PipeScheduler.ThreadPool; 51_ioQueueSchedulers = new PipeScheduler[IOQueueCount]; 78private void Schedule(PipeScheduler[] schedulers) 99private PipeScheduler[] ParallelBody(int i, ParallelLoopState state, PipeScheduler[] schedulers) 101PipeScheduler pipeScheduler = schedulers[i % schedulers.Length];
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (4)
358public static PipeOptions GetInputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler writerScheduler) => new PipeOptions 369public static PipeOptions GetOutputPipeOptions(ServiceContext serviceContext, MemoryPool<byte> memoryPool, PipeScheduler readerScheduler) => new PipeOptions 1119var inputOptions = Http3InMemory.GetInputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool); 1120var outputOptions = Http3InMemory.GetOutputPipeOptions(_testBase._serviceContext, _testBase._memoryPool, PipeScheduler.ThreadPool);
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
26PipeScheduler scheduler = null,
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (4)
Internal\NamedPipeConnectionListener.cs (4)
57_inputOptions = new PipeOptions(_memoryPool, PipeScheduler.ThreadPool, PipeScheduler.Inline, maxReadBufferSize, maxReadBufferSize / 2, useSynchronizationContext: false); 58_outputOptions = new PipeOptions(_memoryPool, PipeScheduler.Inline, PipeScheduler.ThreadPool, maxWriteBufferSize, maxWriteBufferSize / 2, useSynchronizationContext: false);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Internal\QuicStreamContext.cs (4)
60var inputOptions = new PipeOptions(MemoryPool, PipeScheduler.ThreadPool, PipeScheduler.Inline, maxReadBufferSize, maxReadBufferSize / 2, useSynchronizationContext: false); 61var outputOptions = new PipeOptions(MemoryPool, PipeScheduler.Inline, PipeScheduler.ThreadPool, maxWriteBufferSize, maxWriteBufferSize / 2, useSynchronizationContext: false);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (25)
Client\SocketConnectionFactory.cs (6)
37var applicationScheduler = _options.UnsafePreferInlineScheduling ? PipeScheduler.Inline : PipeScheduler.ThreadPool; 38var transportScheduler = applicationScheduler; 40var awaiterScheduler = OperatingSystem.IsWindows() ? transportScheduler : PipeScheduler.Inline;
Internal\SocketAwaitableEventArgs.cs (2)
19private readonly PipeScheduler _ioScheduler; 27public SocketAwaitableEventArgs(PipeScheduler ioScheduler)
Internal\SocketConnection.cs (1)
36PipeScheduler socketScheduler,
Internal\SocketReceiver.cs (1)
11public SocketReceiver(PipeScheduler ioScheduler) : base(ioScheduler)
Internal\SocketSender.cs (1)
16public SocketSender(PipeScheduler scheduler) : base(scheduler)
Internal\SocketSenderPool.cs (3)
15private readonly PipeScheduler _scheduler; 18public SocketSenderPool(PipeScheduler scheduler) 23public PipeScheduler Scheduler => _scheduler;
SocketConnectionContextFactory.cs (11)
42var applicationScheduler = options.UnsafePreferInlineScheduling ? PipeScheduler.Inline : PipeScheduler.ThreadPool; 51var transportScheduler = options.UnsafePreferInlineScheduling ? PipeScheduler.Inline : new IOQueue(); 58SocketSenderPool = new SocketSenderPool(PipeScheduler.Inline), 66var transportScheduler = options.UnsafePreferInlineScheduling ? PipeScheduler.Inline : PipeScheduler.ThreadPool; 75SocketSenderPool = new SocketSenderPool(PipeScheduler.Inline), 119public PipeScheduler Scheduler { get; init; } = default!;
Microsoft.AspNetCore.SignalR.Client.Tests (4)
HubConnectionTests.cs (2)
226var connection = new TestConnection(pipeOptions: new PipeOptions(readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, pauseWriterThreshold: 100, useSynchronizationContext: false, resumeWriterThreshold: 50));
TestConnection.cs (2)
55var options = pipeOptions ?? new PipeOptions(readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (2)
43var options = new PipeOptions(readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false,
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
TestClient.cs (2)
43var options = new PipeOptions(readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false,
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
54Scheduler = PipeScheduler.ThreadPool;
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
54Scheduler = PipeScheduler.ThreadPool;
System.IO.Pipelines (23)
System\IO\Pipelines\Pipe.cs (5)
43private PipeScheduler ReaderScheduler => _options.ReaderScheduler; 44private PipeScheduler WriterScheduler => _options.WriterScheduler; 803private static void ScheduleCallbacks(PipeScheduler scheduler, PipeCompletionCallbacks completionCallbacks) 811private static void TrySchedule(PipeScheduler scheduler, in CompletionData completionData) 837private static void ScheduleWithContext(PipeScheduler scheduler, in CompletionData completionData)
System\IO\Pipelines\PipeOptions.cs (12)
20/// <param name="readerScheduler">The <see cref="System.IO.Pipelines.PipeScheduler" /> to be used to execute <see cref="System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</param> 21/// <param name="writerScheduler">The <see cref="System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</param> 28PipeScheduler? readerScheduler = null, 29PipeScheduler? writerScheduler = null, 81ReaderScheduler = readerScheduler ?? PipeScheduler.ThreadPool; 82WriterScheduler = writerScheduler ?? PipeScheduler.ThreadPool; 104/// <summary>Gets the <see cref="System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</summary> 105/// <value>A <see cref="System.IO.Pipelines.PipeScheduler" /> object used to execute <see cref="System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</value> 106public PipeScheduler WriterScheduler { get; } 108/// <summary>Gets the <see cref="System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</summary> 109/// <value>A <see cref="System.IO.Pipelines.PipeScheduler" /> that is used to execute <see cref="System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</value> 110public PipeScheduler ReaderScheduler { get; }
System\IO\Pipelines\PipeScheduler.cs (6)
14/// <summary>The <see cref="System.IO.Pipelines.PipeScheduler" /> implementation that queues callbacks to the thread pool.</summary> 15/// <value>A <see cref="System.IO.Pipelines.PipeScheduler" /> instance that queues callbacks to the thread pool.</value> 16public static PipeScheduler ThreadPool => s_threadPoolScheduler; 18/// <summary>The <see cref="System.IO.Pipelines.PipeScheduler" /> implementation that runs callbacks inline.</summary> 19/// <value>A <see cref="System.IO.Pipelines.PipeScheduler" /> instance that runs callbacks inline.</value> 20public static PipeScheduler Inline => s_inlineScheduler;