redis处理 请求时候 业务处理 是利用回调函数
伊谢尔伦
伊谢尔伦 2017-04-24 09:13:51
0
3
666

问题描述:
咨询一个技术问题 redis处理 请求时候 业务处理 是利用回调函数
typedef void aeFileProc(struct aeEventLoop eventLoop, int fd, void clientData, int mask);

问题1 这个回调执行是在是重新开辟一个线程吗?这个跟liunx 信号有点类型 我一直想不明白

  假如回到执行a函数 a函数是在哪里执行的呀 

问题2 liunx 太神奇了 定义一个typedef void aeFileProc变成回到了 这个不懂
有限解决问题1

多谢

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
左手右手慢动作

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?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template