mirror of https://github.com/Cysharp/UniTask
Tweaks
parent
caccccb0b5
commit
911c37d4d8
|
@ -256,9 +256,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -361,9 +363,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -468,9 +472,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -595,9 +601,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -739,9 +747,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -865,9 +875,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -989,9 +1001,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,9 +99,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -218,9 +220,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -336,9 +340,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
{
|
{
|
||||||
|
@ -450,9 +456,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -587,9 +595,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,9 +159,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -227,10 +229,9 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +244,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -94,9 +94,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,9 +155,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public UniTaskStatus GetStatus(short token)
|
public UniTaskStatus GetStatus(short token)
|
||||||
|
@ -220,10 +222,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -235,7 +235,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -382,9 +381,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -451,10 +452,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -466,7 +465,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -614,9 +612,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -683,10 +683,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -698,7 +696,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endif
|
#endif
|
||||||
|
@ -847,9 +844,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -916,10 +915,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -931,7 +928,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endif
|
#endif
|
||||||
|
@ -1096,9 +1092,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
{
|
{
|
||||||
|
@ -1173,10 +1171,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -1192,7 +1188,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -230,9 +230,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
if (!(cancelImmediately && cancellationToken.IsCancellationRequested))
|
||||||
|
{
|
||||||
TryReturn();
|
TryReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<# if (!IsVoid(t)) { #>
|
<# if (!IsVoid(t)) { #>
|
||||||
void IUniTaskSource.GetResult(short token)
|
void IUniTaskSource.GetResult(short token)
|
||||||
|
@ -315,10 +317,8 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
TryReturn();
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
completed = true;
|
completed = true;
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
@ -341,7 +341,6 @@ namespace Cysharp.Threading.Tasks
|
||||||
<# } #>
|
<# } #>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
<# if(IsUnityWebRequest(t) || IsAssetBundleModule(t)) { #>
|
<# if(IsUnityWebRequest(t) || IsAssetBundleModule(t)) { #>
|
||||||
|
|
Loading…
Reference in New Issue