Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Saurabh Sharma
Saurabh Sharma

Posted on

     

Explain use of concurrency Like I'm Five

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
deciduously profile image
Ben Lovy
Just this guy, you know?
  • Email
  • Location
    Boston, MA, USA
  • Education
    Currently enrolled @ Champlain College Online
  • Work
    Rust Developer @ Tangram.dev
  • Joined
• Edited on• Edited

If I'm understanding the question correctly, a good simple example of an application that leverages concurrency is a webserver. When a server receives an incoming request, it should be able to process that request without stopping any other incoming requests. That is, if this request needs to read a database and do a transformation, it should be able toalso respond to other incoming requests and queue up their workat the same time as it's working on the database request. This is how, say, DEV.to is able to have all of us browsing and commenting at the same time without the blocking each other from accessing the site. If DEV were not concurrent, me posting a comment would mean that nobody else could load the home page while it was working on that.

If you're looking forhow to write a concurrent program, it's a huge topic! There are a number of different ways to go about it. Do you have a specific language/stack in mind?

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Fullstack Web developer.
  • Location
    Delhi, India
  • Work
    Fullstack Web Developer at Codeword Tech
  • Joined

More fromSaurabh Sharma

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp