IO programming in Python

Preface: Since programs and running data reside in memory, they are executed by the ultra-fast computing core of the CPU. When it comes to data exchange, usually disks, networks, etc., IO interfaces are required. Since the speed of CPU and memory is much higher than the speed of peripherals, there is a serious mismatch of speed in IO programming. At this time, there are two solutions, one is synchronous IO (the CPU pauses until the data is rewritten to the disk) and the other is asynchronous IO (the CPU does not wait and continues to execute subsequent code). Obviously, the complexity of asynchronous is higher than that of synchronous IO, so only synchronous IO is discussed here.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324655263&siteId=291194637