mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-25 17:30:12 +00:00
Merge 6b1e951b64 into 64285ae060
This commit is contained in:
@@ -66,12 +66,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
action();
|
action();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -81,6 +80,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
action();
|
action();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,12 +94,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
action(state);
|
action(state);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -109,6 +108,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
action(state);
|
action(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,12 +122,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
await action();
|
await action();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -137,6 +136,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
await action();
|
await action();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,12 +150,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
await action(state);
|
await action(state);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -165,6 +164,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
await action(state);
|
await action(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,12 +178,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return func();
|
return func();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -194,6 +193,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return func();
|
return func();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,23 +205,22 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return await func();
|
return await func();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
await UniTask.Yield();
|
await UniTask.Yield();
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
var result = await func();
|
var result = await func();
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return result;
|
return result;
|
||||||
@@ -235,12 +234,11 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return func(state);
|
return func(state);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -251,6 +249,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return func(state);
|
return func(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,23 +261,22 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
await UniTask.SwitchToThreadPool();
|
await UniTask.SwitchToThreadPool();
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
if (configureAwait)
|
if (configureAwait)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return await func(state);
|
return await func(state);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
await UniTask.Yield();
|
await UniTask.Yield();
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
var result = await func(state);
|
var result = await func(state);
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user