'Disconnect a database connection associated with this pool.
Note: This function should only be used by the same thread which called
L{ConnectionPool.connect}. As with C{connect}, this function is not
used in normal non-threaded Twisted code.'

def disconnect(self, conn):

    tid = self.threadID()
    if (conn is not self.connections.get(tid)):
        raise Exception('wrong    connection    for    thread')
    if (conn is not None):
        self._close(conn)
        del self.connections[tid]
