# File lib/phusion_passenger/abstract_request_handler.rb, line 310
        def start_main_loop_thread
                current_generation = @main_loop_generation
                @main_loop_thread = Thread.new do
                        begin
                                main_loop
                        rescue Exception => e
                                print_exception(self.class, e)
                        end
                end
                @main_loop_thread_lock.synchronize do
                        while @main_loop_generation == current_generation
                                @main_loop_thread_cond.wait(@main_loop_thread_lock)
                        end
                end
        end