lib/asynchronic/garbage_collector.rb in asynchronic-2.0.1 vs lib/asynchronic/garbage_collector.rb in asynchronic-3.0.0
- old
+ new
@@ -16,9 +16,11 @@
@running = true
while @running
processes = environment.processes
+ processes.each(&:abort_if_dead)
+
conditions.each do |name, condition|
Asynchronic.logger.info('Asynchronic') { "Running GC - #{name}" }
begin
processes.select(&condition).each(&:destroy)
rescue => ex
\ No newline at end of file