We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e81e09 commit 93ce4d8Copy full SHA for 93ce4d8
kyo-core/shared/src/main/scala/kyo/Sync.scala
@@ -119,6 +119,11 @@ object Sync:
119
f(using AllowUnsafe.embrace.danger)
120
}
121
122
+ inline def ensure[A, S](inline f: AllowUnsafe ?=> Any < (Sync & Abort[Throwable]))(v: => A < S)(using
123
+ inline frame: Frame
124
+ ): A < (Sync & S) =
125
+ Sync.ensure(f(using AllowUnsafe.embrace.danger))(v)
126
+
127
def withLocal[A, B, S](local: Local[A])(f: AllowUnsafe ?=> A => B < S)(using Frame): B < (S & Sync) =
128
local.use(f(using AllowUnsafe.embrace.danger))
129
0 commit comments