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

Provide a way to disable asynchronous execution #16

Merged
merged 3 commits into from Aug 13, 2013
Merged

Conversation

matze
Copy link
Contributor

@matze matze commented Aug 12, 2013

Currently, it's a royal pain in the butt to debug Concert because everything can potentially run asynchronously and the raised exceptions usually do not tell where they happened.

This change adds the module variable concert.asynchronous.DISABLE which, when set to True, will create fake Future objects which are the same as real Futures except that they aren't submitted to any kind of executor but return immediately with a valid result. Hence it's much easier to reason about the flow of execution.

To make good use of this feature I added a nose plugin, that is installed with the custom runner runtests.py. Note that it takes the same options as if you'd call nosetests.

Matthias Vogelgesang added 2 commits August 12, 2013 15:43
This is done by returning a FakeFuture that is not the result of submitting the
work to an executor but returned directly.
@matze
Copy link
Contributor Author

matze commented Aug 13, 2013

@sensej I don't know if GitHub tells you about new pull requests via mail, but this ping will certainly get through to you ;-)

@tfarago
Copy link
Contributor

tfarago commented Aug 13, 2013

That's a great idea! I was often irritated myself when something went wrong.

@matze
Copy link
Contributor Author

matze commented Aug 13, 2013

Ok, then I will merge.

matze added a commit that referenced this pull request Aug 13, 2013
Provide a way to disable asynchronous execution
@matze matze merged commit 751e2aa into master Aug 13, 2013
@matze matze deleted the disable-async branch August 13, 2013 09:40
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