GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — bpo-29569: threading.Timer class: Continue periodical execution till action return True by slytomcat · Pull Request #121 · python/cpython Conversation
|
|
I've fixed test for continuous execution of Timer class. Now check passed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am wondering how it will influence existing code. Most of the functions currently used in Timer callback probably not returning True value. It means that they will be executed infinitely. Maybe it's better to add some new argument like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No, exactly conversely - if function returns None or not True it will run only once. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@slytomcat right, sorry, my bad |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
codecov/patch — 81.25% of diff hit (target 100%) - anybody know how to fix it? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if not self.finished.is_set(): | ||
| self.function(*self.args, **self.kwargs) | ||
| """Continue execution after wait until function returns True""" | ||
| while(not self.finished.wait(self.interval)): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Try to add test case when this is true. It might help you get 100% coverage
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done. But: codecov/patch — 86.95% of diff hit (target 100%) - some red lines in Lib/test/test_threading.py.
I have no idea how to cover tests by tests =/
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have to reorganize my cloned repo so the CR have to be reissued. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Reopened CR: #191 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ile clearing a thread state If Python clears a thread state and a destructor or a weakref-callback runs Python code, Python used to create a new initial stub without clearing it later. This change reorders PyThreadState_Clear() to clear the PyStacklessState sub-structure last. A new test case for this problem uses thread local storage to execute a __del__-method. https://bitbucket.org/stackless-dev/stackless/issues/121 (grafted from ede2ad2b32b917d364f523318a82c75d0df2a0e6)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.