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:
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
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.
We're a place where coders share, stay up-to-date and grow their careers.
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.