dotnet / dotnet/dotnet-api-docs

update GC.TryStartNoGCRegion doc

Open
#8,366 2 comments 0 reactions 1 assignee Claimed by @cshung View on GitHub
area-System.Runtime doc-enhancement Pri1 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

**Issue description**

the [doc](https://docs.microsoft.com/en-us/dotnet/api/system.gc.trystartnogcregion?view=net-6.0) requires some updates after our 7.0 work. an important update should be the ephemeral segment size limit for specifying the size which is no longer the case for 7.0.

also in general I noticed we didn't specify enough details for the API behavior such as

+ what happens to the latency mode when an exception is thrown
+ if you have allocated more than the size you specified what is the behavior (ie, a GC will happen and we will exit the NoGCRegion mode and revert back to the previous latency mode)

since customers can check the latency mode before they decide whether they want to call the API it's important to spell out the behavior wrt latency mode.

**Target framework**

- [x] .NET Core
- [ ] .NET Framework
- [ ] .NET Standard

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.