5

定时器组件设计

 3 years ago
source link: https://atticuslab.com/2020/09/28/timer-func/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

定时器组件设计

2020-09-28

31

  • timefd时间描述符+epoll
  • 基于升序链表的定时器
  • 基于时间轮(环形队列+双向链表)定时器:
  • 基于时间堆(小根堆/优先队列)定时器:Libevent与Rust Async: futures-timer
  • 红黑树定时器(nginx红黑树实现)

Hashed and Hierarchical Timing Wheels: Data Structures
for the Efficient Implementation of a Timer Facility


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK