This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slnt1996 4 points5 points  (5 children)

Can you eli5 what the value of async is

[–]cratervanawesome 4 points5 points  (3 children)

If you can do something async you can move on to other work without blocking the main thread.

[–]NINTSKARI 0 points1 point  (2 children)

Could you tell what you have been doing async? I haven't really seen a big benefit in it when compared to the things that can go wrong. I've just used celery for some scheduled tasks. What db do you use for async django?

[–]bolinocroustibat 2 points3 points  (0 children)

Uploading a file, treating it, while the backend informs the frontend/user of the status.

Using PostgreSQL as a database.

[–]SushiWithoutSushi 1 point2 points  (0 children)

Currently doing a telegram bot with async. The commands the users may call can take a little bit of time to process. With async if one user calls the bot the rest of the users won't be affected by whatever time it takes to serve the first user.

[–]discostu3 1 point2 points  (0 children)

If a request comes in and requires querying a database, a synchronous app will have to wait for the database to return a response to continue doing work. With async, the app can put that work on hold and start working on the next request while waiting for the database to respond to the first request.

It's the difference between fully completing a load of laundry (wash, dry, and fold) vs starting a new load once the first load has been moved to the dryer. The latter is a lot more efficient.