mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-25 18:09:17 +01:00
Fix wrong CancellationToken usage
This commit is contained in:
parent
e2a18dee5e
commit
8ccfac2318
1 changed files with 4 additions and 4 deletions
|
|
@ -113,7 +113,7 @@ internal partial class StaThreadService : IInternalDisposableService
|
|||
using var cts = CancellationTokenSource.CreateLinkedTokenSource(
|
||||
this.cancellationTokenSource.Token,
|
||||
cancellationToken);
|
||||
await this.taskFactory.StartNew(action, cancellationToken).ConfigureAwait(true);
|
||||
await this.taskFactory.StartNew(action, cts.Token).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
/// <summary>Runs a given delegate in the messaging thread.</summary>
|
||||
|
|
@ -126,7 +126,7 @@ internal partial class StaThreadService : IInternalDisposableService
|
|||
using var cts = CancellationTokenSource.CreateLinkedTokenSource(
|
||||
this.cancellationTokenSource.Token,
|
||||
cancellationToken);
|
||||
return await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true);
|
||||
return await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
/// <summary>Runs a given delegate in the messaging thread.</summary>
|
||||
|
|
@ -138,7 +138,7 @@ internal partial class StaThreadService : IInternalDisposableService
|
|||
using var cts = CancellationTokenSource.CreateLinkedTokenSource(
|
||||
this.cancellationTokenSource.Token,
|
||||
cancellationToken);
|
||||
await await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true);
|
||||
await await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
/// <summary>Runs a given delegate in the messaging thread.</summary>
|
||||
|
|
@ -151,7 +151,7 @@ internal partial class StaThreadService : IInternalDisposableService
|
|||
using var cts = CancellationTokenSource.CreateLinkedTokenSource(
|
||||
this.cancellationTokenSource.Token,
|
||||
cancellationToken);
|
||||
return await await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true);
|
||||
return await await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
[LibraryImport("ole32.dll")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue