问题描述:
咨询一个技术问题 redis处理 请求时候 业务处理 是利用回调函数
typedef void aeFileProc(struct aeEventLoop eventLoop, int fd, void clientData, int mask);
问题1 这个回调执行是在是重新开辟一个线程吗?这个跟liunx 信号有点类型 我一直想不明白
假如回到执行a函数 a函数是在哪里执行的呀
问题2 liunx 太神奇了 定义一个typedef void aeFileProc变成回到了 这个不懂
有限解决问题1
多谢
After reading this, I feel like I have a big tongue. . . Don’t understand
The callback function is not necessarily executed in another thread. It may be executed in the current thread. This is still related to the specific implementation.
If you want to know the answer, just look at the implementation of this method
My main question is that reids processes requests in a single-process and single-thread manner.
If a request processing time takes too long, will it not affect other businesses?
I looked at the code with this question
They used a callback function to process the request
1 When I wrote dmeo, the current process handled it
I thought of liunx signal processing. I don’t know where it is executed?