def _worker(self):
     self.workerThread = threading.current_thread()
     assert self.session is None
     self.session = self.context.db._createSession()
     try:
         ThreadPool._worker(self)
     finally:
         assert self.session is not None
         self.session.commit()
         self.session.close()
示例#2
0
    def _worker(self):
        from twisted.internet import reactor
        tracer = Tracer()
        tracer.install()
        ThreadPool._worker(self)

        out = StringIO()

        tracer.write_data(out)

        reactor.callFromThread(self.output_callgrind, out.getvalue())
        out.close()
        tracer.uninstall()
示例#3
0
 def _worker(self):
     log.debug("Starting ADBAPI thread: %s" % (thread.get_ident(),))
     ThreadPool._worker(self)
     self._closeConnection()
示例#4
0
 def _worker(self):
     log.debug("Starting ADBAPI thread: %s" % (thread.get_ident(),))
     ThreadPool._worker(self)
     self._closeConnection()