Adds wait option to result() and fetch()

This commit is contained in:
Ilan Steemers
2015-09-18 10:57:09 +02:00
parent a30e5d2c28
commit a493f9cc78
4 changed files with 38 additions and 9 deletions
+4 -1
View File
@@ -127,7 +127,10 @@ Use `async` from your code to quickly offload tasks:
task_result = result(task_id)
# result returns None if the task has not been executed yet
# so in most cases you will want to use a hook:
# you can wait for it
task_result = result(task_id, 200)
# but in most cases you will want to use a hook:
async('math.modf', 2.5, hook='hooks.print_result')