From 55030a7829599850c1fe565868ac5119c968f02f Mon Sep 17 00:00:00 2001 From: David Bailey Date: Fri, 14 Apr 2023 10:26:52 +0200 Subject: [PATCH] feat: :sparkles: add deadlock detection to find_next --- lib/comfpile/core.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/comfpile/core.rb b/lib/comfpile/core.rb index 5832d81..bfb2d39 100644 --- a/lib/comfpile/core.rb +++ b/lib/comfpile/core.rb @@ -106,6 +106,8 @@ module Comfpile end def processing_stack_find_next() + return nil if @processing_stack.empty? + i = 0 @processing_stack.reverse_each do |a| i += 1 @@ -115,6 +117,9 @@ module Comfpile end end + # TODO: Fix up later-on for parallel runner capabilities + raise "Deadlock found, no item was willing to run!" + nil end