From d893af6342587b967a1702a259a8a8d68ac842af Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Mon, 3 Jul 2023 22:30:07 +1000 Subject: [PATCH] fix(pipeline): close in finalize --- shard.yml | 2 +- src/tasker/pipeline.cr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shard.yml b/shard.yml index 1e697ad..862cc0b 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: tasker -version: 2.1.2 +version: 2.1.3 crystal: ">= 0.36.1" dependencies: diff --git a/src/tasker/pipeline.cr b/src/tasker/pipeline.cr index 526d34e..d0c4b78 100644 --- a/src/tasker/pipeline.cr +++ b/src/tasker/pipeline.cr @@ -77,7 +77,7 @@ class Tasker # :nodoc: def finalize - stop + close end # shutdown processing @@ -96,8 +96,8 @@ class Tasker begin @idle = true input = @in.receive - t1 = Time.monotonic @idle = false + t1 = Time.monotonic output = @work.call input t2 = Time.monotonic @time = t2 - t1