STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Oh, there is another possible implementation: use a subprocess. But if the 
timeout is implemented using a subprocess, the syntax cannot be:

with timeout(5):
   do_something()

It should be something like:


timeout(5, """if 1:
   import os, sys
   ...
   do_something()
   ...
   sys.exit(0)
""")

Some tests are already doing that manually.

----------

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

Reply via email to