22 implementations of IValueTaskSource
Microsoft.AspNetCore.Server.HttpSys (1)
AsyncAcceptContext.cs (1)
10internal sealed unsafe partial class AsyncAcceptContext : IValueTaskSource<RequestContext>, IDisposable
Microsoft.AspNetCore.Server.IIS (3)
Core\IO\AsyncIOOperation.cs (1)
11internal abstract class AsyncIOOperation : IValueTaskSource<int>, IValueTaskSource
Core\NativeSafeHandle.cs (1)
9internal sealed class NativeSafeHandle : SafeHandle, IValueTaskSource<object?>
src\aspnetcore\src\Shared\ServerInfrastructure\ManualResetValueTaskSource.cs (1)
11internal sealed class ManualResetValueTaskSource<T> : IValueTaskSource<T>, IValueTaskSource
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\ServerInfrastructure\ManualResetValueTaskSource.cs (1)
11internal sealed class ManualResetValueTaskSource<T> : IValueTaskSource<T>, IValueTaskSource
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
TlsAwaitable.cs (1)
28internal sealed class TlsAwaitable<T> : IValueTaskSource<T>
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\SocketAwaitableEventArgs.cs (1)
15internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, IValueTaskSource<SocketOperationResult>
System.IO.Pipelines (2)
System\IO\Pipelines\Pipe.DefaultPipeReader.cs (1)
13private sealed class DefaultPipeReader : PipeReader, IValueTaskSource<ReadResult>
System\IO\Pipelines\Pipe.DefaultPipeWriter.cs (1)
13private sealed class DefaultPipeWriter : PipeWriter, IValueTaskSource<FlushResult>
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (1)
12internal sealed class CreditWaiter : IValueTaskSource<int>
System.Net.Sockets (4)
System\Net\Sockets\Socket.Tasks.cs (4)
977internal sealed class AwaitableSocketAsyncEventArgs : SocketAsyncEventArgs, IValueTaskSource, IValueTaskSource<int>, IValueTaskSource<Socket>, IValueTaskSource<SocketReceiveFromResult>, IValueTaskSource<SocketReceiveMessageFromResult>
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (2)
30internal sealed class ThreadPoolValueTaskSource : IThreadPoolWorkItem, IValueTaskSource<int>, IValueTaskSource<long>, IValueTaskSource
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (2)
246internal abstract class StateMachineBox : IValueTaskSource<TResult>, IValueTaskSource 311IValueTaskSource<TResult>, IValueTaskSource, IAsyncStateMachineBox, IThreadPoolWorkItem
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
160private sealed class State : IValueTaskSource<bool>
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
19internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, IValueTaskSource<int>, IValueTaskSource
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
19internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, IValueTaskSource<int>, IValueTaskSource
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
505internal abstract class AsyncOperation<TSelf, TResult> : AsyncOperation<TSelf>, IValueTaskSource<TResult>
79 references to IValueTaskSource
mscorlib (1)
mscorlib.cs (1)
108[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
netstandard (1)
netstandard.cs (1)
2113[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (3)
97int IValueTaskSource<int>.GetResult(short token) => 99ValueTaskSourceStatus IValueTaskSource<int>.GetStatus(short token) => 101void IValueTaskSource<int>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) =>
System.Net.Sockets (4)
System\Net\Sockets\Socket.Tasks.cs (4)
1247int IValueTaskSource<int>.GetResult(short token) 1285Socket IValueTaskSource<Socket>.GetResult(short token) 1307SocketReceiveFromResult IValueTaskSource<SocketReceiveFromResult>.GetResult(short token) 1329SocketReceiveMessageFromResult IValueTaskSource<SocketReceiveMessageFromResult>.GetResult(short token)
System.Private.CoreLib (66)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (3)
576Debug.Assert(obj is IValueTaskSource<T>); 577vtsCont.Initialize<T>(Unsafe.As<object, IValueTaskSource<T>>(ref obj), valueTask._token); 591private static unsafe T Suspend<T>(IValueTaskSource<T> source, short token, bool continueOnCapturedContext)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.ValueTaskSourceContinuation.cs (7)
44public void Initialize<T>(IValueTaskSource<T> source, short token) 68Debug.Assert(source is IValueTaskSource<T>); 69IValueTaskSource<T> typedSource = Unsafe.As<object, IValueTaskSource<T>>(ref source); 75Debug.Assert(source is IValueTaskSource<T>); 76IValueTaskSource<T> typedSource = Unsafe.As<object, IValueTaskSource<T>>(ref source);
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (1)
66int IValueTaskSource<int>.GetResult(short token) => (int)GetResult(token);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.cs (6)
189Debug.Assert(obj is IValueTaskSource<T>); 190IValueTaskSource<T> vts = Unsafe.As<object, IValueTaskSource<T>>(ref obj); 380Debug.Assert(obj is IValueTaskSource<T>); 381IValueTaskSource<T> vts = Unsafe.As<object, IValueTaskSource<T>>(ref obj);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (6)
168Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 176Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, 190Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 198Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, 210Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 226Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ThreadPool.s_invokeAsyncStateMachineBox, box, _value._token,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (2)
296TResult IValueTaskSource<TResult>.GetResult(short token) => throw NotImplemented.ByDesign; 455TResult IValueTaskSource<TResult>.GetResult(short token)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ValueTaskAwaiter.cs (6)
140Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 148Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext | ValueTaskSourceOnCompletedFlags.FlowExecutionContext); 160Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 168Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext); 179Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 195Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ThreadPool.s_invokeAsyncStateMachineBox, box, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (4)
183/// <summary>Core of the <see cref="IValueTaskSource{TResult}"/> implementation.</summary> 272bool IValueTaskSource<bool>.GetResult(short token) 309ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) => _mrvtsc.GetStatus(token); 312void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\IValueTaskSource.cs (4)
8/// <see cref="IValueTaskSource.OnCompleted"/> and <see cref="IValueTaskSource{TResult}.OnCompleted"/> 30/// <summary>Indicates the status of an <see cref="IValueTaskSource"/> or <see cref="IValueTaskSource{TResult}"/>.</summary> 70/// <summary>Schedules the continuation action for this <see cref="IValueTaskSource{TResult}"/>.</summary> 77/// <summary>Gets the result of the <see cref="IValueTaskSource{TResult}"/>.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
10/// <summary>Provides the core logic for implementing a manual-reset <see cref="IValueTaskSource"/> or <see cref="IValueTaskSource{TResult}"/>.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (26)
451/// <see cref="ValueTask{TResult}"/> instances may be backed by <see cref="IValueTaskSource{TResult}"/> instances that are reusable, and such 458/// was constructed from an <see cref="IValueTaskSource{TResult}"/>. 473/// <summary>null if <see cref="_result"/> has the result, otherwise a <see cref="Task{TResult}"/> or a <see cref="IValueTaskSource{TResult}"/>.</summary> 477/// <summary>Opaque value passed through to the <see cref="IValueTaskSource{TResult}"/>.</summary> 517/// <summary>Initialize the <see cref="ValueTask{TResult}"/> with a <see cref="IValueTaskSource{TResult}"/> object that represents the operation.</summary> 521public ValueTask(IValueTaskSource<TResult> source, short token) 586Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 598return GetTaskForValueTaskSource(Unsafe.As<IValueTaskSource<TResult>>(obj)); 604/// <summary>Creates a <see cref="Task{TResult}"/> to represent the <see cref="IValueTaskSource{TResult}"/>.</summary> 606/// The <see cref="IValueTaskSource{TResult}"/> is passed in rather than reading and casting <see cref="_obj"/> 609private Task<TResult> GetTaskForValueTaskSource(IValueTaskSource<TResult> t) 649/// <summary>Type used to create a <see cref="Task{TResult}"/> to represent a <see cref="IValueTaskSource{TResult}"/>.</summary> 655vtst._source is not IValueTaskSource<TResult> source) 699private IValueTaskSource<TResult>? _source; 703public ValueTaskSourceAsTask(IValueTaskSource<TResult> source, short token) 718Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 730return Unsafe.As<IValueTaskSource<TResult>>(obj).GetStatus(_token) != ValueTaskSourceStatus.Pending; 741Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 753return Unsafe.As<IValueTaskSource<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Succeeded; 763Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 775return Unsafe.As<IValueTaskSource<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Faulted; 781/// If the <see cref="ValueTask{TResult}"/> is backed by a result or by a <see cref="IValueTaskSource{TResult}"/>, 790Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 802return Unsafe.As<IValueTaskSource<TResult>>(obj).GetStatus(_token) == ValueTaskSourceStatus.Canceled; 814Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 827return Unsafe.As<IValueTaskSource<TResult>>(obj).GetResult(_token);
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
837[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
79int IValueTaskSource<int>.GetResult(short token)
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SocketAwaitableEventArgs.cs (1)
79int IValueTaskSource<int>.GetResult(short token)
System.Threading.Tasks.Extensions (1)
System.Threading.Tasks.Extensions.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]