STINNER Victor added the comment:

"But that isn't quite true.  It is the callback associated with the future that 
is displaying the result and stopping the loop."
I wrote this example to show that setting the result of a future can schedule a 
callback. I mean something like:

"In this example, the future is used to link slow_operation() to got_result(): 
when slow_operation() is done, got_result() is called with the result."

The main idea behind Future is to chain callbacks and the link is done 
externally. It's different from this design:

    def slow_operation(done_callback):
        ...
        done_callback()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22473>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to