typelevel / typelevel/cats-effect

Idea: Keep count / identifiers of all Ref/Deferred in runtime

Open
#931 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

This probably goes into CE3 territory, but it would be nice if we had more productionreadiness-friendly utilities in the runtime. It might be a bit too heavy in performance-sensitive code, but for most users having an extra reference for each Ref or Deferred would probably not be that much memory pressure.

Some extra ideas in the area:

  • being able to access the identity of the fiber that spawned/changed a Ref/Deferred, the fibers waiting on a Deferred
  • looking at the tree of fibers in the runtime, along with identities of fibers waiting on them / having canceled them

On top of such registries, we could probably build some useful debugging/monitoring tools, an example of something similar in the wild is https://github.com/ScalaConsultants/panopticon-tui.

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.

Research direction

The proposal concerns runtime registries for Ref and Deferred objects, fiber identities, waiting fibers, and fiber relationships. No files, tests, or entry points are named; first identify the relevant runtime subsystem and define the scope and performance requirements before determining what completion would mean.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.