    # File lib/phusion_passenger/abstract_server_collection.rb, line 78
            def synchronize
                    @lock.synchronize do
                            @in_synchronize_block = true
                            begin
                                    yield
                            ensure
                                    if @next_cleaning_time.nil?
                                            @collection.each_value do |server|
                                                    if @next_cleaning_time.nil? ||
                                                       (eligable_for_cleanup?(server) &&
                                                        server.next_cleaning_time < @next_cleaning_time
                                                       )
                                                            @next_cleaning_time = server.next_cleaning_time
                                                    end
                                            end
                                            if @next_cleaning_time.nil?
                                                    # There are no servers in the collection with an idle timeout.
                                                    @next_cleaning_time = Time.now + 60 * 60
                                            end
                                            @next_cleaning_time_changed = true
                                    end
                                    if @next_cleaning_time_changed
                                            @next_cleaning_time_changed = false
                                            @cond.signal
                                    end
                                    @in_synchronize_block = false
                            end
                    end
            end