PipeScheduler
Abstraction for running PipeReader and PipeWriter callbacks and continuations.
using System.Runtime.CompilerServices;
namespace System.IO.Pipelines
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class PipeScheduler
{
private static readonly ThreadPoolScheduler s_threadPoolScheduler = new ThreadPoolScheduler();
private static readonly InlineScheduler s_inlineScheduler = new InlineScheduler();
public static PipeScheduler ThreadPool => s_threadPoolScheduler;
public static PipeScheduler Inline => s_inlineScheduler;
[System.Runtime.CompilerServices.NullableContext(2)]
public abstract void Schedule([System.Runtime.CompilerServices.Nullable(new byte[] {
1,
2
})] Action<object> action, object state);
[System.Runtime.CompilerServices.NullableContext(2)]
internal virtual void UnsafeSchedule([System.Runtime.CompilerServices.Nullable(new byte[] {
1,
2
})] Action<object> action, object state)
{
Schedule(action, state);
}
}
}