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

fixes #808 - requests hangs in engine.read exception #871

Merged
merged 6 commits into from Mar 10, 2017

Conversation

savar
Copy link
Contributor

@savar savar commented Feb 26, 2017

in case an exception is thrown inside the engine.read() method the
exception was either not catched properly (in case the THREADPOOL size
is >0) or the result was not a tuple and the unpacking waits for more
data while calling .result() (in case the THREADPOOL size is 0)

@scorphus
Copy link
Member

scorphus commented Mar 4, 2017

Thanks for the contribution, @savar. Can you please add tests for this?

@savar
Copy link
Contributor Author

savar commented Mar 6, 2017

@scorphus I'll try to add tests.

savar and others added 5 commits March 6, 2017 15:14
in case an exception is thrown inside the engine.read() method the
exception was either not catched properly (in case the THREADPOOL size
is >0) or the result was not a tuple and the unpacking waits for more
data while calling .result() (in case the THREADPOOL size is 0)
the ThreadPoolWorker is using _WorkerItems() wrapping the Future()
and using the Future().set_exception() method so the exception is
thrown at the Future().result() call so it is similar to what happens
when using the ThreadPoolWorker
@savar
Copy link
Contributor Author

savar commented Mar 6, 2017

@scorphus I fixed the checks but to be honest the part I would like to test (the function passing the def inner method) I cannot mock. So can you please tell me what kind of tests you would like to have?

@scorphus scorphus merged commit 9fba8e6 into thumbor:master Mar 10, 2017
@scorphus
Copy link
Member

Thanks, @savar!

[…] can you please tell me what kind of tests you would like to have?

Keep an eye on upcoming tests 😉

scorphus added a commit to scorphus/thumbor that referenced this pull request Mar 10, 2017
@savar savar deleted the avoid_blocking branch March 11, 2017 18:09
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