Popular recipes by David Perry http://code.activestate.com/recipes/users/138465/2002-04-16T21:12:21-07:00ActiveState Code RecipesEasy threading with Futures (Python)
2002-04-16T21:12:21-07:00David Perryhttp://code.activestate.com/recipes/users/138465/http://code.activestate.com/recipes/84317-easy-threading-with-futures/
<p style="color: grey">
Python
recipe 84317
by <a href="/recipes/users/138465/">David Perry</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 2.
</p>
<p>Although Python's thread syntax is nicer than in many languages, it can still be a pain if all one wants to do is run a time-consuming function in a separate thread, while allowing the main thread to continue uninterrupted. A Future provides a legible and intuitive way to achieve such an end.</p>