What is async and when and why to use it? How async of Python is different from Go one?
I am new to this so I need help!
What is async and when and why to use it? How async of Python is different from Go one?
I am new to this so I need help!
For further actions, you may consider blocking this person and/or reporting abuse
Allan Githaiga -
Jonah Katz -
João Vitor -
Mihika -
Top comments (3)
Async means Asynchronous. Its mainly used with await in Python. They are there for concurrent programming not to be confused with paralel.
You are using it when you want to call/run something that you don't know when it will return an answer or even have an answer. So, with using async you can "independently" execute code. It is mainly used for service calls or URL checks.
The main concept is the same in Python and Go: We're doing cooperative concurrency. The objective is to improve horizontal scalability - the ability of an application to scale across more users at a time. I wrote a bit of a longer piece on this topic that you might find interesting:
Is Cooperative Concurrency Here to Stay?
Nested Software ・ Sep 18 '18 ・ 8 min read
All the clocks of the world tick asynchronously when placed next to each other. But all clocks synchronously tick 1 second at a time.
Async is a keyword that features in many programming languages, it generally is a marker stating that you should wait until the data arrives then for example all the clocks must strike 12 before we do anything with that data. This likely differs between languages.