Get started with async in Python

Asynchronous programming, or async for short, is a feature of many modern languages that allows a program to juggle multiple operations without waiting or getting hung up on any one of them. It’s a smart way to efficiently handle tasks like network or file I/O, where most of the program’s time is spent waiting for a task to finish.

Consider a web scraping application that opens 100 network connections. You could open one connection, wait for the results, then open the next and wait for the results, and so on. Most of the time the program runs is spent waiting on a network response, not doing actual work.

分類: Android News 安卓新聞, IT 資訊科技(信息技术), 熱門新聞,標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 。這篇內容的永久連結