Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30727: Fix a race condition in test_threading.#2334

Merged
serhiy-storchaka merged 2 commits intopython:masterpython/cpython:masterfrom
serhiy-storchaka:test-notifyserhiy-storchaka/cpython:test-notifyCopy head branch name to clipboard
Jun 23, 2017
Merged

bpo-30727: Fix a race condition in test_threading.#2334
serhiy-storchaka merged 2 commits intopython:masterpython/cpython:masterfrom
serhiy-storchaka:test-notifyserhiy-storchaka/cpython:test-notifyCopy head branch name to clipboard

Conversation

@serhiy-storchaka
Copy link
Member

No description provided.

@serhiy-storchaka serhiy-storchaka added the tests Tests in the Lib/test dir label Jun 22, 2017
@vstinner
Copy link
Member

I would prefer to change the test in the master branch, and backport it later.

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@serhiy-storchaka serhiy-storchaka changed the base branch from 2.7 to master June 22, 2017 20:22
@serhiy-storchaka serhiy-storchaka changed the title [2.7] bpo-30727: Fix a race condition in test_treading. bpo-30727: Fix a race condition in test_treading. Jun 22, 2017
@serhiy-storchaka
Copy link
Member Author

I would prefer to change the test in the master branch, and backport it later.

Done.

@pitrou pitrou changed the title bpo-30727: Fix a race condition in test_treading. bpo-30727: Fix a race condition in test_threading. Jun 22, 2017
# we continue. See issues #8799 and #30727.
while len(ready) < 5:
_wait()
ready = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest ready.clear() rather than ready=[], just in case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this doesn't matter, all workers settle into cond.wait().

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@serhiy-storchaka serhiy-storchaka merged commit 32cb968 into python:master Jun 23, 2017
@serhiy-storchaka serhiy-storchaka deleted the test-notify branch June 23, 2017 10:36
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 23, 2017
@bedevere-bot
Copy link

GH-2351 is a backport of this pull request to the 3.6 branch.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 23, 2017
@bedevere-bot
Copy link

GH-2352 is a backport of this pull request to the 3.5 branch.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 23, 2017
@bedevere-bot
Copy link

GH-2353 is a backport of this pull request to the 2.7 branch.

serhiy-storchaka added a commit that referenced this pull request Jun 23, 2017
serhiy-storchaka added a commit that referenced this pull request Jun 23, 2017
serhiy-storchaka added a commit that referenced this pull request Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.