[英]How to respond to http and keep the goroutine running ? Go
I'm wondering if it's possible to respond to a http request using the std http package and still keep the go routine alive ( eg run a task intensive task ). 我想知道是否有可能使用std http包响应http请求,并且仍然使go例程保持活动状态(例如,运行任务密集型任务)。 The use case is that I need to receive a http request and then call back that service after few minutes
用例是我需要接收一个http请求,然后在几分钟后回叫该服务
只需从您的处理程序中产生一个新的goroutine,并使其保持活动状态即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.