AutoResetUniTaskCompletionSource Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public class AutoResetUniTaskCompletionSource : IUniTaskSource, IPromisePoolItem, IPromise, IResolvePromise, IRejectPromise, ICancelPromise
Inheritance
System.Object → AutoResetUniTaskCompletionSourceMembers
Properties
Name | Description |
---|---|
Task |
Methods
Properties
Task
public UniTask Task { get; }
Property Value
Methods
Create()
public static AutoResetUniTaskCompletionSource Create()
Returns
CreateCompleted(out Int16)
public static AutoResetUniTaskCompletionSource CreateCompleted(out short token)
Parameters
token
System.Int16
Returns
CreateFromCanceled(CancellationToken, out Int16)
public static AutoResetUniTaskCompletionSource CreateFromCanceled(CancellationToken cancellationToken, out short token)
Parameters
cancellationToken
System.Threading.CancellationTokentoken
System.Int16
Returns
CreateFromException(Exception, out Int16)
public static AutoResetUniTaskCompletionSource CreateFromException(Exception exception, out short token)
Parameters
exception
System.Exceptiontoken
System.Int16
Returns
Finalize()
protected void Finalize()
GetResult(Int16)
public void GetResult(short token)
Parameters
token
System.Int16
GetStatus(Int16)
public UniTaskStatus GetStatus(short token)
Parameters
token
System.Int16
Returns
OnCompleted(Action<Object>, Object, Int16)
public void OnCompleted(Action<object> continuation, object state, short token)
Parameters
continuation
System.Action<System.Object>state
System.Objecttoken
System.Int16
TrySetCanceled(CancellationToken)
public bool TrySetCanceled(CancellationToken cancellationToken = default(CancellationToken))
Parameters
cancellationToken
System.Threading.CancellationToken
Returns
- System.Boolean
TrySetException(Exception)
public bool TrySetException(Exception exception)
Parameters
exception
System.Exception
Returns
- System.Boolean
TrySetResult()
public bool TrySetResult()
Returns
- System.Boolean
UnsafeGetStatus()
public UniTaskStatus UnsafeGetStatus()
Returns
Implements
IPromisePoolItem