[qmtest] cPickle.UnpickleableError: Cannot pickle <type 'thread.lock'> objects
Mark Mitchell
mark at codesourcery.com
Thu Mar 6 18:55:54 UTC 2003
On Thu, 2003-03-06 at 10:43, Sven Lundblad wrote:
> I have target classes that spawns a thread per instance that it
> dispatches one test at a time to. This allows RunTest to return directly
> back to the execution engine. My _RecordResult looks like this:
> def _RecordResult(self, result):
> """Run after a test have been executed by __RunTests()."""
> # Make us idle (idle is counted down when the scheduler
> # posts a new Test in RunTest).
> assert self.jobthread_id == thread.get_ident()
> if(result.GetKind() == result.TEST):
> self.lock.acquire()
> self.idle = self.idle + 1
> self.lock.release()
> Target._RecordResult(self, result)
> # End of _RecordResult
Some how, you're managing to get a thread lock into the result, which is
odd.
You might insert some debugging stuff there and see if you can see what
the result contains at that point.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
More information about the qmtest
mailing list