ChannelPool.acquire() returns a promise that always resolves at least in the next tick due to how native Promises work.
One possible optimization is that if there are free channels in the pool, acquire returns one synchronously. This is probably most effective in conjunction with more optimizations in Broker.publish() to expect synchronous return value from pool.acquire() and return synchronously, releasing the channel in the same way as well.
ChannelPool.acquire()returns a promise that always resolves at least in the next tick due to how native Promises work.One possible optimization is that if there are free channels in the pool,
acquirereturns one synchronously. This is probably most effective in conjunction with more optimizations inBroker.publish()to expect synchronous return value frompool.acquire()and return synchronously, releasing the channel in the same way as well.