dotnet / dotnet/orleans

Is GrainCancellationToken default behivor to be called explicility?

Open
#8,758 0 comments 3 reactions 0 assignees View on GitHub
Needs: triage :mag:
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
13h 56m
Merged PRs (30d)
351

Description

I've read a lot about `GrainCancellationToken` and the proposed methods to improve it - see the debate on [GitHub](https://github.com/dotnet/orleans/issues/7977 )

I couldn't understand one thing; probably someone here can help clear things. I would expect a `GrainCancellationToken` to be similar to a `CancellationToken` approach for HTTP controllers, meaning if ttl is reached, implicitly cancel the request or cancel the operation.

I created a simple hello world program that tested it, registering the `CancellationToken` to the cancel method of `GrainCancellationTokenSource`, but it wasn't implicitly triggered. I had to explicitly call `ThrowIfCancellationRequested`

What do you think? Am I missing something?

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked discussion in issue #7977 and reproduce the described hello-world program using GrainCancellationTokenSource and CancellationToken registration. Determine whether reaching the TTL is expected to cancel the operation implicitly or only when cancellation is observed explicitly; the issue is done when that behavior and any required change are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.