class Async::Container::Supervisor::MemoryMonitor

def run

@returns [Async::Task] The task that is running the memory monitor.

Run the memory monitor.
def run
	Async do
		while true
			# This block must return true if the process was killed.
			@cluster.check! do |process_id, monitor|
				Console.error(self, "Memory leak detected in process:", process_id: process_id, monitor: monitor)
				memory_leak_detected(process_id, monitor)
			end
			
			sleep(@interval)
		end
	end
end