Popular recipes tagged "timeout" but not "process"http://code.activestate.com/recipes/tags/timeout-process/2013-05-24T05:19:50-07:00ActiveState Code RecipesRetry loop (Python) 2013-05-23T20:45:01-07:00Ryan Nowakowskihttp://code.activestate.com/recipes/users/4186624/http://code.activestate.com/recipes/578527-retry-loop/ <p style="color: grey"> Python recipe 578527 by <a href="/recipes/users/4186624/">Ryan Nowakowski</a> (<a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/loop/">loop</a>, <a href="/recipes/tags/retry/">retry</a>, <a href="/recipes/tags/timeout/">timeout</a>). </p> <p>Encapsulates the logic of a retry loop using a generator function.</p> Retry loop (Python) 2013-05-24T05:19:50-07:00Oren Tiroshhttp://code.activestate.com/recipes/users/2033964/http://code.activestate.com/recipes/578163-retry-loop/ <p style="color: grey"> Python recipe 578163 by <a href="/recipes/users/2033964/">Oren Tirosh</a> (<a href="/recipes/tags/exception/">exception</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/loop/">loop</a>, <a href="/recipes/tags/retry/">retry</a>, <a href="/recipes/tags/timeout/">timeout</a>). Revision 4. </p> <p>Encapsulates the logic of a retry loop using a generator function.</p> timeout decorator (with multiprocessing) (Python) 2011-08-23T05:25:09-07:00matt harrisonhttp://code.activestate.com/recipes/users/4179061/http://code.activestate.com/recipes/577853-timeout-decorator-with-multiprocessing/ <p style="color: grey"> Python recipe 577853 by <a href="/recipes/users/4179061/">matt harrison</a> (<a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/decorators/">decorators</a>, <a href="/recipes/tags/multiprocessing/">multiprocessing</a>, <a href="/recipes/tags/timeout/">timeout</a>). </p> <p>Given that threads shouldn't be killed, multiprocessing is one mechanism for limiting time on a potentially long running computation.</p> RSH with timeout (Python) 2010-09-13T06:49:35-07:00Shrinidhi Raohttp://code.activestate.com/recipes/users/4174946/http://code.activestate.com/recipes/577390-rsh-with-timeout/ <p style="color: grey"> Python recipe 577390 by <a href="/recipes/users/4174946/">Shrinidhi Rao</a> (<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/execution/">execution</a>, <a href="/recipes/tags/remote/">remote</a>, <a href="/recipes/tags/rsh/">rsh</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/timeout/">timeout</a>). </p> <p>RSH sometimes hangs if it cannot resolve to a given host. So here is a quick recipe in python </p> Timeout for (nearly) any callable (Python) 2010-12-20T06:51:35-08:00Jean Brouwershttp://code.activestate.com/recipes/users/2984142/http://code.activestate.com/recipes/576780-timeout-for-nearly-any-callable/ <p style="color: grey"> Python recipe 576780 by <a href="/recipes/users/2984142/">Jean Brouwers</a> (<a href="/recipes/tags/threads/">threads</a>, <a href="/recipes/tags/timeout/">timeout</a>). Revision 5. </p> <p>This recipe provides 2 ways to invoke any callable with a time limit. Usable for Python 2.2 thru 3.0, see the Note in the module __doc__.</p>