U Ec©_’ã@sJz ddlZWnek r(ddlZYnXddlmZGdd„deƒZdS)éNé)Ú Connectioncs8eZdZdZ‡fdd„Zdd„Zdd„Zdd „Z‡ZS) ÚPoolingConnectionzö Base connection class for connections that use libraries without thread safety and no capacity for connection pooling. To use this just implement a ``_make_connection`` method that constructs a new connection and returns it. cs t ¡|_tt|ƒj||ŽdS©N)ÚqueueÚQueueÚ_free_connectionsÚsuperrÚ__init__)ÚselfÚargsÚkwargs©Ú __class__©úG/tmp/pip-target-m1bursmm/lib/python/elasticsearch/connection/pooling.pyr !s zPoolingConnection.__init__cCs0z |j ¡WStjk r*| ¡YSXdSr)rÚ get_nowaitrÚEmptyZ_make_connection©r rrrÚ_get_connection%s z!PoolingConnection._get_connectioncCs|j |¡dSr)rÚput)r ÚconrrrÚ_release_connection+sz%PoolingConnection._release_connectioncCsdS)z- Explicitly close connection NrrrrrÚclose.szPoolingConnection.close) Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrÚ __classcell__rrrrrs  r)rÚ ImportErrorrÚbaserrrrrrÚs