mirror of
https://github.com/kennethreitz/background.git
synced 2026-06-05 23:10:18 +00:00
Merge pull request #8 from ned2/master
print result in callback example
This commit is contained in:
+2
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user