diff --git a/src/TaskCounters.jl b/src/TaskCounters.jl index 0faed44..0ca2af6 100644 --- a/src/TaskCounters.jl +++ b/src/TaskCounters.jl @@ -26,7 +26,7 @@ function dec!(t::TaskCounter, n::Int=1) Base.@lock t begin @assert t.n >= n "Trying decrement a `TaskCounter` past zero, `$(t.n)` -> `$(t.n - n)`" t.n -= n - notify(t.cond) + (t.n == 0) && notify(t.cond) end return nothing end diff --git a/src/payload.jl b/src/payload.jl index b1f6857..6c4ac39 100644 --- a/src/payload.jl +++ b/src/payload.jl @@ -3,7 +3,7 @@ # # What we send to the consume! method -struct ParsedPayload{B<:AbstractResultBuffer, C<:AbstractParsingContext} +struct ParsedPayload{B, C<:AbstractParsingContext} row_num::Int len::Int results::B