func_timeout icon indicating copy to clipboard operation
func_timeout copied to clipboard

Python module which allows you to specify timeouts when calling any existing function, and support for stoppable threads

Results 12 func_timeout issues
Sort by recently updated
recently updated
newest added

I have a python code of 1000 LOC that I am happy to share. It uses a client with GUI and a server. Upon user.__button_click(), the client sends a request...

Hi, I'd like to use this library on py38 and higher. Since py2 and py35 are outdated, I have removed them and applied some automatic refactorings for newer python. All...

[ver 4.3.5] There's a typo in the library's Name attribute: installation registers the name as "func-timeout" but the library is still called 'func_timeout'. See the screenshots below. ![func_timeout](https://user-images.githubusercontent.com/56240329/135778870-cc8f63ea-6f2a-41c0-90c2-fc7f50699e0a.jpg)

I'm using it under Python 3.8.4 ```python from time import sleep from func_timeout import func_set_timeout @func_set_timeout(1) def func_1(sec): print(f"in func 1, sleeping {sec} sec but will timeout in 1 sec")...

I use func_timeout with python 3.6.9,sometimes it will produce many func_timeout.dafunc.FunctionTimedOut{hash} exceptions. ![image](https://user-images.githubusercontent.com/3282955/99026168-5de43300-25a5-11eb-884b-185730f82764.png) ![image](https://user-images.githubusercontent.com/3282955/99026254-8b30e100-25a5-11eb-905e-e8de038979ef.png)。Normally I can not catch this exception,In python 3.6.9, use sys.excepthook could get the error. In python...

I am trying to figure out the correct way to use this library, I use the following test code: ```# python Python 2.7.5 (default, Sep 15 2016, 22:37:39) [GCC 4.8.5...

``` def get_video_capture2(timeout=1): try: ReturnValue = func_timeout(timeout , cap .read) return ReturnValue except FunctionTimedOut: print("cap .read could not complete within {} seconds and was terminated".format(timeout)) except Exception as e: print("Exception...

I find that FunctionTimedOut is the same level exceptions as Exception, and both create from BaseException. this thing makes me a little bit confused at the first time.

The code currently states different versions of the LGPL. Which is the correct one? Current statements: * LGPLv2.1: https://github.com/kata198/func_timeout/blob/50baa8db502fd24acc0f2a1bc473649505336997/setup.py#L4 * LGPLv2: https://github.com/kata198/func_timeout/blob/50baa8db502fd24acc0f2a1bc473649505336997/setup.py#L46 * LGPLv3 for the files in `func_timeout`, `tests`...