A
A
agent_22032021-02-01 15:44:22
Working with date/time
agent_2203, 2021-02-01 15:44:22

How to set the maximum execution time of a function in python?

Is it possible to make it so that you call the function and if, say, 5 seconds have passed and there is no answer, then the function execution ends?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2021-02-01
@agent_2203

Choose:
https://stackoverflow.com/questions/492519/timeout...
https://stackoverflow.com/questions/43336019/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question