What is async?
Meaning: The two sides do not need a common clock, that is, the receiver does not know when the sender is sent, so in the message sent will be prompted to receive information, such as Start bit, and at the end of the stop bit
Phenomenon: There is no common clock, do not consider the order to deal with
Intuitive feeling: It is not necessary to wait, high efficiency
Synchronous
Meaning: Refers to two or more than two times the amount of change in the process of maintaining a certain relative relationship
Phenomenon: There is a common clock, which is processed in the order of one
Intuitive feeling: Just need to wait, inefficient
So today we look at how to implement Tornado async in code in 2 ways?
These are the imported packages:
2 ways to implement tornado asynchronous code implementations with code:
Python core Framework Tornado 2 ways of asynchronous co-processes
Here is the service startup:
Well, today's knowledge to share here, more resources to learn, welcome to the headlines Love programming south wind, private key words: learning materials, access to more learning resources, if the article is helpful to you, please collect attention, in the future to share more with you learn Python articles. Also welcome comments in the following section on how to learn Python.
Python core Framework Tornado 2 ways of asynchronous co-processes