Troubleshooting ReleaseOnCancelClient, 2nd attempt

This commit is contained in:
Christian Köllner 2019-08-23 21:41:32 +02:00
parent 97c2c2d127
commit d97010de42

View File

@ -332,9 +332,15 @@ namespace Capnp.Net.Runtime.Tests
try
{
t.Result.Dispose();
// Scenario 1: Cancellation happened after computing the answer, but before client-side completion.
}
catch (TaskCanceledException)
{
// Scenario 2: Cancellation happened before or while computing the answer.
}
catch (ObjectDisposedException)
{
// Scenario 3: Cancellation happened after computing the answer, and after client-side completion.
}
}));
}