From 38928f3a2f247055972be5e7da7a0db27ff0b443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Drvo=C5=A1t=C4=9Bp?= Date: Thu, 29 Jun 2023 10:44:30 +0200 Subject: [PATCH] Only wake up lexer when we're done parsing --- src/TaskCounters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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