print result in callback example

This commit is contained in:
Ned Letcher
2017-09-12 13:41:02 +10:00
parent 0cb39fbfc8
commit d2b63a6500
+2 -1
View File
@@ -47,10 +47,11 @@ Advanced Usage
@background.task
def work():
time.sleep(10)
return "Done!"
@background.callback
def work_callback(future):
print(future)
print(future.result())
for _ in range(100):