Closed veikkoeeva closed 8 years ago
As I see this:
CancellationToken
's register delegate, that will call cancel on corresponding CancellationTokenSource
that will be located on the same silo with callee grain. Codegen realization of it effectively makes it pay-for-use feature.CancellationTokenSource
's, and this means that they have at least once cancel semantics, and this semantics should be preserved. Resolved via https://github.com/dotnet/orleans/pull/1599.
Following Gitter discussion, making use of CancellationToken to cancel tasks could be useful. This issue is for more specific discussion. The motivation of this feature conserving system resources and simplifying both Orleans and application code.
The use cases can be divided into three categories:
1.
could start an action that results in Orleans system operation such as grain persistence operations, streaming or the planned event storage. In this situation there is storage dependent technical timeout and possibly a user defined cancellation token linked to this.Questions:
CancellationToken
automatically or should it be user defined?