Replies: 1 comment
-
|
@lqxhub 代码解析 日期: 2024-12-28 21:37:38 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
PikiwiDB 核心组件
private: pikiwidb::WorkIOThreadPool worker_threads_; pikiwidb::IOThreadPool slave_threads_; pikiwidb::CmdThreadPool cmd_threads_;核心流程
命令处理
命令的实际处理流程,由多个 CmdWorkThreadPoolWorker 来完成。PikiwiDB 在启动的时候,会根据配置的 fast_thread_num_和slow_thread_num_参数,启动多个 CmdWorkThreadPoolWorker 线程来监听 CmdThreadPool中待处理的 redis 命令:
CmdWorkThreadPoolWorker 的 Work 方法会被 thread 异步启动,核心流程如下:
LoadWork 的核心逻辑如下:
Beta Was this translation helpful? Give feedback.
All reactions