Answer the question
In order to leave comments, you need to log in
How to exit a function after a certain period of time?
I am writing a chat bot for VK. The main handler function, launched in a separate goroutine, reacts to events, for example, if a new message has arrived. I need to exit this function to release resources if no events occur within 24 hours. How to implement it in Go?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question