Is the production and consumption model asynchronous or Synchronize?

In the

nginx server, after hearing an event in the socket, put the file descriptor in the queue and parse it.
how to implement async in this process?
where does the nginx server reflect async?
there is a question I can"t figure out all the time. Are the production and consumption models asynchronous and Synchronize?
my understanding is: Synchronize, there is no production and consumption model, threads are responsible for handling the whole process.
Asynchronous, the file descriptor of the event is stored in the message queue. The producer: listens to the ePoll thread, the consumer: parses the http, notifies the confd with the condition variable
, and the consuming thread locks the Epoll after being notified. They say this process is a Synchronize process, how do I think it is an asynchronous process?
assumes that it is asynchronous, so how is it implemented?

Mar.23,2021

recently I've been watching UNIX Web programming, which talks about producer and consumer models in part 3: Synchronize.
my personal understanding is Synchronize. For example, if a producer finds that the buffer is full during production, he needs Synchronize to wait for consumers to consume, and then inform the producer through inter-process communication before the producer can continue production. In this process, there is a waiting process, which I personally think is an asynchronous model.

the above is my understanding, please correct if you have any questions.


my personal understanding:
1. Producers and consumers are separated in the program, and producers and consumers each do their own. This is asynchronous
2. Producers notify consumers after production, during which the operation of the message queue needs to be done on Synchronize, otherwise an exception may occur

.
Menu