I'd like to write a function which does something, then before return something it triggers a function to be done after 30 minutes. I do not want to wait 30 minutes until another function will be done to return something from main function, how to do that?
[HttpPost]
public async Task<HttpResponseMessage> CreateEvent(FormDataCollection formData)
{
//do something
asyncFunction(30) - function to be done after 30 minutes (this function will probably have to have Thread.Sleep or something, not sure)
return new HttpResponseMessage(HttpStatusCode.OK);
}
Is it possible in any way? I do not want to wait asyncFunction
to be done to return HttpStatusCode
.