File tree Expand file tree Collapse file tree
src/FSharp.Data.Adaptive/Core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ### 1.2.17
2+ * workaround for LevelChangedException
3+
14### 1.2.16
25* avoid WPF contention-inline problems with transaction
36
Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ type AdaptiveObject() =
1717 [<DefaultValue; ThreadStatic>]
1818 static val mutable private CurrentEvaluationDepth : int
1919
20+ static let mutable unsafePerformLevelChecking = true
21+
22+ static member UnsafePerformLevelChecking
23+ with get() = unsafePerformLevelChecking
24+ and set v = unsafePerformLevelChecking <- v
25+
26+
2027 let mutable outOfDate : bool = true
2128 let mutable level : int = 0
2229 let mutable outputs : WeakOutputSet = WeakOutputSet()
@@ -157,7 +164,7 @@ module AdadptiveObjectExtensions =
157164 if depth > 1 then Transaction.RunningLevel - 1
158165 else Transaction.RunningLevel
159166
160- if x.Level > maxAllowedLevel then
167+ if AdaptiveObject.UnsafePerformLevelChecking && x.Level > maxAllowedLevel then
161168 //printfn "%A tried to pull from level %A but has level %A" top.Id level top.Level
162169 // all greater pulls would be from the future
163170 raise <| LevelChangedException( x.Level + depth)
You can’t perform that action at this time.
0 commit comments