for (var i in data) {
request({
url: 'https://google.com',
agentClass: Agent,
agentOptions: {
socksHost: data[i].host,
socksPort: data[i].port
}
}, function(errChek, resChek) {
if (!errChek) {
data[i].status = true;
} else {
data[i].status = false;
}
})
}
await Promise.all(...promises)
const p1 = callSomeAsyncFunction(),
p2 = callAnotherAsyncFunction(),
p3 = callAnotherAsyncFunction();
await p1;
await p2;
await p3;