多进程工作者的全局定时器 替代单进程工作模式的erlangtimer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
SisMaker 382bede5c4 ft: 添加定时函数执行的策略 il y a 1 an
include ft: IIF改成CASE il y a 1 an
src ft: 添加定时函数执行的策略 il y a 1 an
.gitignore 更新 '.gitignore' il y a 3 ans
LICENSE ft: 多工作者的全局定时器 il y a 3 ans
README.md ft: 添加定时函数执行的策略 il y a 1 an
rebar.config ft: 编译选项 no_debug_info, deterministic il y a 1 an

README.md

gTimer

多工作进程的全局定时器

Build

$ rebar3 compile

Useage

startWork/1     开启指定数量的定时器工作者
setTimer/2      随机一个定时器工作者然后设置定时器 默认一个定时器进程 新开一个进程执行定时到期的函数
setTimer/3      指定选择定时器工作者策略然后设置定时器 默认新开一个进程执行定时到期的函数
setTimer/4      指定选择定时器工作者策略然后设置定时器 并指定执行的函数在定时器的进程 还是新spawn一个进程执行函数(一般来说轻度的函数可以就在定时器进程执行, 重度函数就新开一个进程执行)
getTimer/1      获取定时器的信息
delTimer/1      删除一个定时器