mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 13:04:17 -05:00
Change to TrySet method
This commit is contained in:
parent
6a459e3735
commit
288c440ce6
|
|
@ -193,7 +193,7 @@ namespace UniTask
|
|||
public static Task<T> ToTask<T>(this Schedulable<T> schedulable, IScheduler scheduler)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<T>();
|
||||
schedulable.Subscribe(scheduler, r => tcs.SetResult(r), ex => tcs.SetException(ex));
|
||||
schedulable.Subscribe(scheduler, r => tcs.TrySetResult(r), ex => tcs.TrySetException(ex));
|
||||
return tcs.Task;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user