Answer the question
In order to leave comments, you need to log in
Asynchronous framework in golang?
I decided to delve into golang and write a small API purely for myself (to practice golang).
I searched the Internet, but for some reason I did not find an asynchronous framework or at least a web server for golang.
I considered gin (framework), but everything is synchronous there and only middleware can be made asynchronous. The problem was that the goroutine worked later than the web server returned the response.
Also considered net/http. I also did not find anything in it that would allow asynchronous processing of requests.
PS asynchrony is understood as the ability to run to a third-party api / to the base / yes, God, at least do time.Sleep () and that at that moment the web server can continue to process requests.
For example, node.js has it out of the box. In python, you have to get a little confused, but still.
In go (the very language that is positioned as
Compiled multithreaded programming languagethis is stupidly not there (or not found, at least I did not find any articles, guides, or videos on this topic))
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