You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
async void Main()
{
try
{
var r = await Do();
// do someting
}
catch (TaskCanceledException)
{
// do someting when canceled
}
}
Task<int> Do()
{
var tcs = new TaskCompletionSource<bool>();
tcs.SetCanceled();
return tcs.Task;
}
It works in .NET, however not in Saltarelle.
Since await in Saltarelle will throw InvalidOperationException (actually it won't compile, as there is no TaskCanceledException in Saltarelle).
The text was updated successfully, but these errors were encountered:
Lets have the following code:
It works in .NET, however not in Saltarelle.
Since
await
in Saltarelle will throwInvalidOperationException
(actually it won't compile, as there is noTaskCanceledException
in Saltarelle).The text was updated successfully, but these errors were encountered: