typelevel/cats-effect

Add `Lock` to std

Open

#3,535 opened on Apr 15, 2023

View on GitHub
 (6 comments) (2 reactions) (1 assignee)Scala (572 forks)batch import
:mushroom: enhancementgood first issue

Repository metrics

Stars
 (2,230 stars)
PR merge metrics
 (Avg merge 21d 23h) (18 merged PRs in 30d)

Description

Spinning out of https://github.com/typelevel/cats-effect/pull/3480#discussion_r1125597170.

The API would look something like:

abstract class Lock[F[_]] {
  def shared: Resource[F, Unit]
  def exclusive: Resource[F, Unit]
}

Contributor guide