运行带超时的可调用对象
github.com/crysalead/code
源代码
问题
安装数量: 7,364
依赖项: 0
建议者: 0
安全: 0
星标: 0
关注者: 4
分支: 1
公开问题: 0
Requires
Requires (Dev)
Suggests
None
Provides
Conflicts
Replaces
MIT f4774b957e75c432f2c0411b56658555d7e1e3b8
timeout
This package is auto-updated.
Last update: 2024-08-29 03:18:32 UTC
运行可调用对象直到达到超时
declare(ticks = 1); Code::run(function(){ sleep(100); }, 10);
循环运行可调用对象直到达到超时且返回值是false
false
// declare(ticks = 1); is optionnal when the callable is not blocking on spinning mode Code::spin(function(){ sleep(1); return false; }, 10);