Fix rate control in preStopCheck of ordered stream worker

This commit is contained in:
Harendra Kumar 2024-02-17 02:07:20 +05:30
parent 15418a8f2c
commit f65996aabe

View File

@ -491,10 +491,10 @@ preStopCheck sv heap =
case yieldRateInfo sv of
Nothing -> continue
Just yinfo -> do
rateOk <-
beyondRate <-
isBeyondMaxRate
(maxWorkerLimit sv) (workerCount sv) yinfo
if rateOk then continue else stopping
if beyondRate then stopping else continue
else stopping
abortExecution :: Channel m a -> Maybe WorkerInfo -> IO ()