diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-07 22:15:48 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-05-07 22:15:48 -0400 |
commit | 4356eab1c258c30b54a55042e872d41e1efec127 (patch) | |
tree | d96d8c2b2faed06a97c24fe577fa45b6c27f1f74 | |
parent | f4ef6c65a934b9473797c867f24710f8515c15a6 (diff) | |
download | python-coveragepy-4356eab1c258c30b54a55042e872d41e1efec127.tar.gz |
A thread tweak suggested in #245
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | coverage/pytracer.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 4bf2134..c007a23 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -42,7 +42,11 @@ Unreleased - Officially support PyPy 5.1, which required no changes, just updates to the docs. +- Make a small tweak to how we compare threads, to avoid buggy custom + comparison code in thread classes. (`issue 245`_) + .. _issue 90: https://bitbucket.org/ned/coveragepy/issues/90/lambda-expression-confuses-branch +.. _issue 245: https://bitbucket.org/ned/coveragepy/issues/245/change-solution-for-issue-164 .. _issue 440: https://bitbucket.org/ned/coveragepy/issues/440/yielded-twisted-failure-marked-as-missed .. _issue 460: https://bitbucket.org/ned/coveragepy/issues/460/confusing-html-report-for-certain-partial .. _issue 469: https://bitbucket.org/ned/coveragepy/issues/469/strange-1-line-number-in-branch-coverage diff --git a/coverage/pytracer.py b/coverage/pytracer.py index 4743232..23f4946 100644 --- a/coverage/pytracer.py +++ b/coverage/pytracer.py @@ -137,7 +137,7 @@ class PyTracer(object): def stop(self): """Stop this Tracer.""" self.stopped = True - if self.threading and self.thread != self.threading.currentThread(): + if self.threading and self.thread.ident != self.threading.currentThread().ident: # Called on a different thread than started us: we can't unhook # ourselves, but we've set the flag that we should stop, so we # won't do any more tracing. |