typelevel / typelevel/cats-effect

Stuff in std and unsafe/dual constructors

Open
#1,863 6 comments 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

In kernel, Deferred has unsafe and in constructors. Ref has those plus Ref.Make typeclass constructor. In std, semaphore has a dual-effect constructor (though it, probably wrongly, requires Async) while queues, CountDownLatch and CyclicBarrier don't support any of that. They all could, since their construction effect is some combination of ref + deferred allocations. (utilities creating Resources like Supervisor or Hotswap can't since they need to finalize in F).

There was an old discussion in #373 about why dual-type constructors are useful which still stands today. Arguably, we should be consistent everywhere as CE3 is a sort of a trend-setter in the ecosystem, and support those use cases or explicitly discard them and deprecate everywhere.

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

Start by comparing the existing constructors for kernel Deferred and Ref with the std semaphore implementation. Then inspect queues, CountDownLatch, and CyclicBarrier to determine which constructor variants they expose; done requires either consistent support for the applicable dual-effect and unsafe constructors or an explicit decision to deprecate that pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.