33public struct AtomCurrentContext : AtomContext {
44 @usableFromInline
55 internal let _store : StoreContext
6- @usableFromInline
7- internal let _transactionScopeKey : ScopeKey ?
86
9- internal init ( store: StoreContext , transactionScopeKey : ScopeKey ? ) {
7+ internal init ( store: StoreContext ) {
108 self . _store = store
11- self . _transactionScopeKey = transactionScopeKey
129 }
1310
1411 /// Accesses the value associated with the given atom without watching it.
@@ -27,7 +24,7 @@ public struct AtomCurrentContext: AtomContext {
2724 /// - Returns: The value associated with the given atom.
2825 @inlinable
2926 public func read< Node: Atom > ( _ atom: Node ) -> Node . Produced {
30- _store. read ( atom, transactionScopeKey : _transactionScopeKey )
27+ _store. read ( atom)
3128 }
3229
3330 /// Sets the new value for the given writable atom.
@@ -49,7 +46,7 @@ public struct AtomCurrentContext: AtomContext {
4946 /// - atom: A writable atom to update.
5047 @inlinable
5148 public func set< Node: StateAtom > ( _ value: Node . Produced , for atom: Node ) {
52- _store. set ( value, for: atom, transactionScopeKey : _transactionScopeKey )
49+ _store. set ( value, for: atom)
5350 }
5451
5552 /// Modifies the cached value of the given writable atom.
@@ -73,7 +70,7 @@ public struct AtomCurrentContext: AtomContext {
7370 /// - body: A value modification body.
7471 @inlinable
7572 public func modify< Node: StateAtom > ( _ atom: Node , body: ( inout Node . Produced ) -> Void ) {
76- _store. modify ( atom, transactionScopeKey : _transactionScopeKey , body: body)
73+ _store. modify ( atom, body: body)
7774 }
7875
7976 /// Refreshes and then returns the value associated with the given refreshable atom.
@@ -97,7 +94,7 @@ public struct AtomCurrentContext: AtomContext {
9794 @_disfavoredOverload
9895 @discardableResult
9996 public func refresh< Node: AsyncAtom > ( _ atom: Node ) async -> Node . Produced {
100- await _store. refresh ( atom, transactionScopeKey : _transactionScopeKey )
97+ await _store. refresh ( atom)
10198 }
10299
103100 /// Refreshes and then returns the value associated with the given refreshable atom.
@@ -119,7 +116,7 @@ public struct AtomCurrentContext: AtomContext {
119116 @inlinable
120117 @discardableResult
121118 public func refresh< Node: Refreshable > ( _ atom: Node ) async -> Node . Produced {
122- await _store. refresh ( atom, transactionScopeKey : _transactionScopeKey )
119+ await _store. refresh ( atom)
123120 }
124121
125122 /// Resets the value associated with the given atom, and then notifies.
@@ -140,7 +137,7 @@ public struct AtomCurrentContext: AtomContext {
140137 @inlinable
141138 @_disfavoredOverload
142139 public func reset< Node: Atom > ( _ atom: Node ) {
143- _store. reset ( atom, transactionScopeKey : _transactionScopeKey )
140+ _store. reset ( atom)
144141 }
145142
146143 /// Calls arbitrary reset function of the given atom.
@@ -160,6 +157,6 @@ public struct AtomCurrentContext: AtomContext {
160157 /// - Parameter atom: An atom to reset.
161158 @inlinable
162159 public func reset< Node: Resettable > ( _ atom: Node ) {
163- _store. reset ( atom, transactionScopeKey : _transactionScopeKey )
160+ _store. reset ( atom)
164161 }
165162}
0 commit comments