is there a good way to make some PHP calls asynchronous, non-blocking?
For example, take a look at this simple code:
<?php
$hosts = [...] // array of 100+ hosts
foreach ($hosts as $host){
$sysNames['$host'] = snmpget($host, 'community', "system.sysName.0");
}
echo 'done'
If, for example, 10 hosts are down, that will make a huge delay.
How to make snmpget calls non-blocking?
I've tried with React\Promise but I couldn't found some useful examples to start from. Can anyone suggest proper implementation of that class?