UniTaskCompletionSource Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public class UniTaskCompletionSource : IUniTaskSource, IValueTaskSource, IPromise, IResolvePromise, IRejectPromise, ICancelPromise
Inheritance
System.Object → UniTaskCompletionSourceImplements
System.Threading.Tasks.Sources.IValueTaskSource
Members
Constructors
Name | Description |
---|---|
UniTaskCompletionSource() |
Properties
Name | Description |
---|---|
Task |
Methods
Constructors
UniTaskCompletionSource()
public UniTaskCompletionSource()
Properties
Task
public UniTask Task { get; }
Property Value
Methods
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
Action<System.Object>state
System.Objecttoken
System.Int16
Reset()
public void Reset()
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
Exception
Returns
- System.Boolean
TrySetResult()
public bool TrySetResult()
Returns
- System.Boolean
UnsafeGetStatus()
public UniTaskStatus UnsafeGetStatus()
Returns
Implements
System.Threading.Tasks.Sources.IValueTaskSource