interlude:同步操作的模拟超时

时间:2021-07-14 16:20:36
【文件属性】:
文件名称:interlude:同步操作的模拟超时
文件大小:13KB
文件格式:ZIP
更新时间:2021-07-14 16:20:36
PHP 插曲 Interlude是一个小型 PHP 库,用于重复非阻塞操作,直到成功、达到超时时间或已执行最大尝试次数。 如果您不需要超时功能,您可能想尝试 。 通过包安装 阅读 例子 use Icecave \ Interlude \ Exception \ AttemptsExhaustedException ; use Icecave \ Interlude \ Exception \ TimeoutException ; use Icecave \ Interlude \ Invoker ; $ invoker = new Invoker ; $ operation = function ( $ remainingTimeout , $ remainingAttempts ) { // do work ... }; try { $ invoker -> invoke
【文件预览】:
interlude-develop
----src()
--------Invoker.php(3KB)
--------Exception()
--------InvokerInterface.php(1KB)
--------PackageInfo.php(117B)
----CONTRIBUTING.md(1KB)
----composer.lock(45KB)
----LICENSE.md(1KB)
----README.md(2KB)
----CHANGELOG.md(65B)
----composer.json(873B)

网友评论