Eviction processor no longer keeps cache instance alive by majocha · Pull Request #20758 · dotnet/fsharp · GitHub
Skip to content

Eviction processor no longer keeps cache instance alive - #20758

Merged
T-Gro merged 14 commits into
dotnet:mainfrom
majocha:fix-cache-disposal
Oct 19, 2026
Merged

T-Gro merged 14 commits into
dotnet:mainfrom
majocha:fix-cache-disposal

Conversation

@majocha

@majocha majocha commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Make the background eviction agent shared and do not capture references to cache instances indefinitely. Cache instances no longer manage its lifetime, they simply post work items.
Get rid of cache disposal and finalizer. Idle caches should be quickly garbage collected now.

Fixes #20756

Checklist

  • Test cases added
  • Performance benchmarks added in case of performance changes
  • Release notes entry updated

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

@majocha
majocha marked this pull request as ready for review October 11, 2026 08:52
@majocha
majocha requested a review from a team as a code owner October 11, 2026 08:52

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 🕵️ AI review — verify independently.

Comment thread src/Compiler/Utilities/Caches.fs
Comment thread src/Compiler/Utilities/Caches.fs Outdated
@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label Oct 12, 2026
@T-Gro
T-Gro self-requested a review October 12, 2026 08:37
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Oct 19, 2026
@T-Gro
T-Gro merged commit 5a7448b into dotnet:main Oct 19, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-reviewed PR reviewed by AI review council

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Caches.Cache: its finalizer keeps a dropped check alive for one more full GC, and MailboxProcessor-mode caches are never collected

2 participants