Skip to content

Commit

Permalink
fix dynamic scope impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Mar 8, 2024
1 parent d7eab5a commit 902837d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package reactives.core
import scala.util.DynamicVariable

trait SchedulerWithDynamicScope[State[_], Tx <: Transaction[State]] extends Scheduler[State] {
def dynamicScope: DynamicScopeImpl[State, Tx] = new DynamicScopeImpl[State, Tx](this)
val dynamicScope: DynamicScopeImpl[State, Tx] = new DynamicScopeImpl[State, Tx](this)
}

/** Provides the capability to look up transactions in the dynamic scope. */
Expand All @@ -12,7 +12,7 @@ trait DynamicScope[State[_]] {
def maybeTransaction: Option[Transaction[State]]
}

class DynamicScopeImpl[State[_], Tx <: Transaction[State]](scheduler: SchedulerWithDynamicScope[State, Tx])
class DynamicScopeImpl[State[_], Tx <: Transaction[State]](val scheduler: SchedulerWithDynamicScope[State, Tx])
extends DynamicScope[State] {

final private[reactives] def dynamicTransaction[T](f: Transaction[State] ?=> T): T = {
Expand Down

0 comments on commit 902837d

Please sign in to comment.