parent
50ba93f951
commit
e67562b823
|
@ -40,7 +40,7 @@ namespace UniRx.Async
|
||||||
public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject)
|
public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject)
|
||||||
{
|
{
|
||||||
var trigger = gameObject.GetAsyncDestroyTrigger();
|
var trigger = gameObject.GetAsyncDestroyTrigger();
|
||||||
trigger.AddCancellationTriggerOnDestory(cts);
|
trigger.AddCancellationTriggerOnDestroy(cts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace UniRx.Async.Triggers
|
||||||
bool called = false;
|
bool called = false;
|
||||||
UniTaskCompletionSource promise;
|
UniTaskCompletionSource promise;
|
||||||
CancellationTokenSource cancellationTokenSource; // main cancellation
|
CancellationTokenSource cancellationTokenSource; // main cancellation
|
||||||
object canellationTokenSourceOrQueue; // external from AddCancellationTriggerOnDestory
|
object canellationTokenSourceOrQueue; // external from AddCancellationTriggerOnDestroy
|
||||||
|
|
||||||
public CancellationToken CancellationToken
|
public CancellationToken CancellationToken
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ namespace UniRx.Async.Triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Add Cancellation Triggers on destroy</summary>
|
/// <summary>Add Cancellation Triggers on destroy</summary>
|
||||||
public void AddCancellationTriggerOnDestory(CancellationTokenSource cts)
|
public void AddCancellationTriggerOnDestroy(CancellationTokenSource cts)
|
||||||
{
|
{
|
||||||
if (called)
|
if (called)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue