Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async_q.join() sometimes never return #75

Merged
merged 4 commits into from Jan 28, 2018
Merged

async_q.join() sometimes never return #75

merged 4 commits into from Jan 28, 2018

Conversation

vlanse
Copy link
Contributor

@vlanse vlanse commented Jan 26, 2018

async_q.join() will never return in case when tasks are added to queue via sync_q.put()

@vlanse vlanse changed the title async_q.join() will never return in case when tasks are added to queu… async_q.join() sometimes never return Jan 26, 2018
@codecov
Copy link

codecov bot commented Jan 26, 2018

Codecov Report

Merging #75 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   98.63%   98.63%   -0.01%     
==========================================
  Files           1        1              
  Lines         294      293       -1     
  Branches       41       41              
==========================================
- Hits          290      289       -1     
  Misses          2        2              
  Partials        2        2
Impacted Files Coverage Δ
janus/__init__.py 98.63% <100%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69d4155...78cde4a. Read the comment docs.

@jettify
Copy link
Member

jettify commented Jan 26, 2018

Change looks good, is there any way to construct test case that reproduces issue?

@vlanse
Copy link
Contributor Author

vlanse commented Jan 28, 2018

@jettify
added a test - it will hang forever without a patch, and it will pass with my changes
but had to use sleep() to enforce execution order on the loop


@asyncio.coroutine
def do_work():
yield from asyncio.sleep(1)
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add loop=self.loop here? Looks like this is reason why on 3.4 test stuck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, thanks for pointing this out 👍

@jettify
Copy link
Member

jettify commented Jan 28, 2018

Thanks a lot!

@jettify jettify merged commit 81c4622 into aio-libs:master Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants