class_docstr: A connection pool that works with the threading module.
class_docstr_tok: ["A","connection","pool","that","works","with","the","threading","module","."]
docstr: Get a free connection and assign it to 'key' if not None.
docstr_tok: ["Get","a","free","connection","and","assign","it","to","'key","'","if","not","None","."]
code: def getconn(self, key=None):
      """Get a free connection and assign it to 'key' if not None."""
      self._lock.acquire()
      try:
          return self._getconn(key)
      finally:
          self._lock.release()
  
file_path: psycopg2/lib/pool.py
imports: import psycopg2
  from psycopg2 import extensions
label_desc: Use image node_id 2 for calling the ThreadedConnectionPool obj's underlying member method code with example usage: obj.getconn(key) and returns: self