System.Threading.Timer.Change docs incorrect

Open Beginner friendly
#10,182 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
documentation

Research direction

Start with the System.Threading.Timer.Change API documentation linked in the issue and review the referenced .NET 8 runtime change. Check the Exceptions sections for each Timer.Change overload, then update them to reflect the disposed-timer behavior and add a behavioral-change note if appropriate; done means the published documentation matches .NET 8.

Written by the indexing model from the issue text.

Description

area-System.Threading Pri3 untriaged
Describe the issue or suggestion

The docs for each of the overloads of Timer.Change say the following:

Exceptions
ObjectDisposedException
The Timer has already been disposed.

But it looks like this was intentionally changed in .NET 8 to return false when the timer has been disposed instead of throwing an exception. I think the docs should be updated here, and maybe even a note on the behavioral change if that also seems appropriate.

https://github.com/dotnet/runtime/pull/83604/files#diff-103eceae144a767ba8f1e3b8760cee55cda37ff2af1cc5d40256fe199093c64eR47

Dominant language
C#
Stars
950
Forks
1.7k
Avg merge
3d 5h
Merged PRs (30d)
38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/dotnet-api-docs

All issues in dotnet/dotnet-api-docs

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.