Skip to content

Commit 61a9886

Browse files
committed
Add event::Condition to VND
1 parent f32ea2a commit 61a9886

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/entities/DFGVariable.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ mutable struct VariableNodeData{T<:InferenceVariable}
2323
dontmargin::Bool
2424
solveInProgress::Int
2525
solvedCount::Int
26+
event::Condition #This object is NOT thread-safe. See Threads.Condition for a thread-safe version.
2627
VariableNodeData{T}() where {T <:InferenceVariable} =
27-
new{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0, 0)
28+
new{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0, 0, Condition())
2829
VariableNodeData{T}(val::Array{Float64,2},
2930
bw::Array{Float64,2},
3031
BayesNetOutVertIDs::Array{Symbol,1},
@@ -38,11 +39,12 @@ mutable struct VariableNodeData{T<:InferenceVariable}
3839
ismargin::Bool,
3940
dontmargin::Bool,
4041
solveInProgress::Int=0,
41-
solvedCount::Int=0) where T <: InferenceVariable =
42+
solvedCount::Int=0,
43+
eventCondition::Condition=Condition()) where T <: InferenceVariable =
4244
new{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims,
4345
eliminated,BayesNetVertID,separator,
4446
softtype::T,initialized,inferdim,ismargin,
45-
dontmargin, solveInProgress, solvedCount)
47+
dontmargin, solveInProgress, solvedCount, eventCondition)
4648
end
4749

4850
VariableNodeData(val::Array{Float64,2},

0 commit comments

Comments
 (0)