Add await and make cancel async
This commit is contained in:
parent
c0ef3ccbea
commit
0ff8da2cf0
3 changed files with 8 additions and 9 deletions
|
|
@ -139,15 +139,14 @@ namespace LibationWinForms.ProcessQueue
|
|||
return Result;
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
public async Task Cancel()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CurrentProcessable is AudioDecodable audioDecodable)
|
||||
{
|
||||
//There's some threadding bug that causes this to hang if executed synchronously.
|
||||
Task.Run(audioDecodable.Cancel);
|
||||
|
||||
await Task.Run(audioDecodable.Cancel);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue