#NEWLINE# @ tornado . gen . coroutine #NEWLINE# def preconnect( self , size = ( - 1 ) ) : #NEWLINE# #INDENT# '(pre)Connects some or all redis clients inside the pool.\n\n        Args:\n            size (int): number of redis clients to build and to connect\n                (-1 means all clients if pool max_size > -1)\n\n        Raises:\n            ClientError: when size == -1 and pool max_size == -1\n        ' #NEWLINE# if ( ( size == ( - 1 ) ) and ( self . max_size == ( - 1 ) ) ) : #NEWLINE# #INDENT# raise ClientError ( 'size=-1 not allowed with pool max_size=-1' ) #NEWLINE# #UNINDENT# limit = ( min ( size , _ . max_size ) if ( size != ( - 1 ) ) else self . max_size ) #NEWLINE# clients = ( yield [ self . get_connected_client ( ) for _ in range ( 0 , limit ) ] ) #NEWLINE# for client in clients : #NEWLINE# #INDENT# self . release_client ( client )