           num 5
           executor (make-thread-pool 2 2)
           f (vec (take num (repeat (fn [c sync-chan] (swap! c inc) [c sync-chan]))))
-          f (conj f (fn [c sync-chan] (>!! sync-chan 0)))
           stgs (map stage f)
           ppl (async-dedicated-thread-pool-pipeline stgs executor)]
       (binding [*pre-execution-hook* (fn [_] (reset! h0 true))
-                *post-execution-hook* (fn [_] (reset! h1 true))]
+                *post-execution-hook* (fn [_] (reset! h1 true) (>!! sync-chan 0))]
         (run-pipeline ppl c0 sync-chan)
         (<!! sync-chan)
         (is (= num @c0))

          sync-chan (chan)
          num 5
          f (vec (take num (repeat (fn [c sync-chan] (swap! c inc) [c sync-chan]))))
          f (conj f (fn [c sync-chan] (>!! sync-chan 0)))
          stgs (map stage f)
          ppl (pipeline stgs)]
      (binding [*pre-execution-hook* (fn [_] (reset! h0 true))
                *post-execution-hook* (fn [_] (reset! h1 true))]
        (run-pipeline ppl c0 sync-chan)
        (<!! sync-chan)
        (is (= num @c0))

          num 5
          executor (make-thread-pool 2 2)
          f (vec (take num (repeat (fn [c sync-chan] (swap! c inc) [c sync-chan]))))
          stgs (map stage f)
          ppl (dedicated-thread-pool-pipeline stgs executor)]
      (binding [*pre-execution-hook* (fn [_] (reset! h0 true))
                *post-execution-hook* (fn [_] (reset! h1 true) (>!! sync-chan 0))]
        (run-pipeline ppl c0 sync-chan)
        (<!! sync-chan)
        (is (= num @c0))
