Created
May 1, 2012 22:40
-
-
Save schleppy/2572052 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main_method(arg1, arg2): | |
d = long_method_1(arg1) | |
d2 = long_method_2(arg2) | |
d_list = defer.gatherResults([d, d2]) | |
d_list.addCallback(compose_results); | |
return d_list | |
def long_method_1(arg): | |
deferred = getPage('blah') | |
return deferred1 | |
def long_method_2(arg): | |
deferred = getPage('blah2') | |
return deferred2 | |
def compose_results(results): | |
do composition | |
return composition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment