#NEWLINE# def close( self ) : #NEWLINE# #INDENT# 'Close all connections in the pool.' #NEWLINE# self . _condition . acquire ( ) #NEWLINE# try : #NEWLINE# #INDENT# while self . _idle_cache : #NEWLINE# #INDENT# con = self . _idle_cache . pop ( 0 ) #NEWLINE# try : #NEWLINE# #INDENT# con . _close ( ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . _connections -= 1 #NEWLINE# #UNINDENT# self . _condition . notifyAll ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . _condition . release ( )