Compare commits

...

3 Commits

Author SHA1 Message Date
Tommaso Checchi
d651ec82b4 Merge 6b1e951b64 into 95998ff3f2 2025-09-11 18:52:12 +09:00
Ikiru Yoshizaki
95998ff3f2 ci: dependabot cooldown 65d2ae 2025-09-10 12:34:40 +09:00
Tommaso Checchi
6b1e951b64 RunOnThreadPool: fixed an issue where a cancellation could prevent returning to the main thread 2025-07-09 21:29:12 -07:00
2 changed files with 19 additions and 19 deletions

View File

@@ -5,8 +5,10 @@ updates:
directory: "/"
schedule:
interval: "weekly" # Check for updates to GitHub Actions every week
cooldown:
default-days: 14 # Wait 14 days before creating another PR for the same dependency. This will prevent vulnerability on the package impact.
ignore:
# I just want update action when major/minor version is updated. patch updates are too noisy.
- dependency-name: '*'
- dependency-name: "*"
update-types:
- version-update:semver-patch

View File

@@ -66,12 +66,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
action();
}
finally
@@ -81,6 +80,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
action();
}
@@ -94,12 +94,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
action(state);
}
finally
@@ -109,6 +108,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
action(state);
}
@@ -122,12 +122,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
await action();
}
finally
@@ -137,6 +136,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
await action();
}
@@ -150,12 +150,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
await action(state);
}
finally
@@ -165,6 +164,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
await action(state);
}
@@ -178,12 +178,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
return func();
}
finally
@@ -194,6 +193,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
return func();
}
}
@@ -205,23 +205,22 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
return await func();
}
finally
{
cancellationToken.ThrowIfCancellationRequested();
await UniTask.Yield();
cancellationToken.ThrowIfCancellationRequested();
}
}
else
{
cancellationToken.ThrowIfCancellationRequested();
var result = await func();
cancellationToken.ThrowIfCancellationRequested();
return result;
@@ -235,12 +234,11 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
return func(state);
}
finally
@@ -251,6 +249,7 @@ namespace Cysharp.Threading.Tasks
}
else
{
cancellationToken.ThrowIfCancellationRequested();
return func(state);
}
}
@@ -262,23 +261,22 @@ namespace Cysharp.Threading.Tasks
await UniTask.SwitchToThreadPool();
cancellationToken.ThrowIfCancellationRequested();
if (configureAwait)
{
try
{
cancellationToken.ThrowIfCancellationRequested();
return await func(state);
}
finally
{
cancellationToken.ThrowIfCancellationRequested();
await UniTask.Yield();
cancellationToken.ThrowIfCancellationRequested();
}
}
else
{
cancellationToken.ThrowIfCancellationRequested();
var result = await func(state);
cancellationToken.ThrowIfCancellationRequested();
return result;