You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day. Help to understand, the php-snmp library is not supported by Swoole Coroutine ? Because asynchrony is blocked, and requests are executed in turn.
But work in tests like sleep, exec, file_get_contents, etc.
Maybe there is a solution to solve this issue?
Thanks
<?php
use function Swoole\Coroutine\go;
use function Swoole\Coroutine\run;
run(function () {
for ($i = 1; $i < 100; ++$i) {
go(function () use ($i) {
$snmp = new \SNMP(\SNMP::VERSION_2c, '10.10.0.' . $i, 'public');
$snmp->get('.1.3.6.1.2.1.1.3.0');
var_dump($snmp);
});
}
});
The text was updated successfully, but these errors were encountered:
4khobta
changed the title
SNMP library blocking Coroutine
SNMP library blocks Coroutine
Jul 7, 2023
Good day. Help to understand, the php-snmp library is not supported by Swoole Coroutine ? Because asynchrony is blocked, and requests are executed in turn.
But work in tests like sleep, exec, file_get_contents, etc.
Maybe there is a solution to solve this issue?
Thanks
The text was updated successfully, but these errors were encountered: