Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教定时线程池问题 #87

Open
fucccx opened this issue Sep 20, 2024 · 1 comment
Open

请教定时线程池问题 #87

fucccx opened this issue Sep 20, 2024 · 1 comment

Comments

@fucccx
Copy link

fucccx commented Sep 20, 2024

在星球项目描述里:“实现Raft协议的心跳与选举机制,通过定时线程池触发心跳与选举任务,并维护集群的日志提交状态”,想问下定时线程池是在哪里实现的,体现在哪里呀?谢谢~

@578223592
Copy link
Collaborator

@fucccx 更好的描述也许应该是:通过定时的方式,线程池xxx。
你可以关注:

  m_ioManager->scheduler([this]() -> void { this->leaderHearBeatTicker(); });
  m_ioManager->scheduler([this]() -> void { this->electionTimeOutTicker(); });

  std::thread t3(&Raft::applierTicker, this);
  t3.detach();

相关内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants