@@ -15,7 +15,8 @@ class Hybrid < Forked
1515 # @parameter count [Integer] The number of instances to start.
1616 # @parameter forks [Integer] The number of processes to fork.
1717 # @parameter threads [Integer] the number of threads to start.
18- def run ( count : nil , forks : nil , threads : nil , **options , &block )
18+ # @parameter health_check_timeout [Numeric] The timeout for health checks, in seconds. Passed into the child {Threaded} containers.
19+ def run ( count : nil , forks : nil , threads : nil , health_check_timeout : nil , **options , &block )
1920 processor_count = Container . processor_count
2021 count ||= processor_count ** 2
2122 forks ||= [ processor_count , count ] . min
@@ -25,7 +26,7 @@ def run(count: nil, forks: nil, threads: nil, **options, &block)
2526 self . spawn ( **options ) do |instance |
2627 container = Threaded . new
2728
28- container . run ( count : threads , **options , &block )
29+ container . run ( count : threads , health_check_timeout : health_check_timeout , **options , &block )
2930
3031 container . wait_until_ready
3132 instance . ready!
@@ -34,6 +35,7 @@ def run(count: nil, forks: nil, threads: nil, **options, &block)
3435 rescue Async ::Container ::Terminate
3536 # Stop it immediately:
3637 container . stop ( false )
38+ raise
3739 ensure
3840 # Stop it gracefully (also code path for Interrupt):
3941 container . stop
0 commit comments