Skip to content

Commit

Permalink
Update run_with_timeout docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Aug 9, 2011
1 parent a7852f1 commit 2aee92e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example-stringifier.py
Expand Up @@ -53,7 +53,8 @@ def run_with_timeout(code, time, globals=None):
"""
Evaluate ``code``, timing out after ``time`` seconds.
``time`` must be an integer. The return value is whatever ``code`` returns.
In Python 2.5 and lower, ``time`` is rounded up to the nearest integer.
The return value is whatever ``code`` returns.
"""
# Set the signal handler and a ``time``-second alarm
signal.signal(signal.SIGALRM, lambda s, f: timeout(s, f, time))
Expand Down

0 comments on commit 2aee92e

Please sign in to comment.