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

貢獻者指南