typelevel/cats-effect

Add `Lock` to std

开放

#3,535 创建于 2023年4月15日

 (6 条评论) (2 个反应) (1 位负责人)Scala (572 个派生)batch import
:mushroom: enhancementgood first issue

仓库指标

星标
 (2,230 个星标)
PR 合并指标
 (平均合并 21天 23小时) (30 天内合并 18 个 PR)

描述

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]
}

贡献者指南