def clear(self):
        """Delete all sessions in the pool."""

        while True:
            try:
                session = self._sessions.get(block=False)
            except queue.Empty:
                break
            else:
                session.delete()
def clear ( self ) : while True : try : session = self . _sessions . get ( block = False ) except queue . Empty : break else : session . delete ( )
Delete all sessions in the pool.