Closed gabrielmer closed 1 week ago
LGTM! Thanks for it! 💯 Nevertheless, I wonder if we could also indicate the number of used/occupied connections
So I thought about it at first but didn't do it because of the existence of the following proc
Which means that the number of connections is not necessarily maximum - available
and I didn't see in ConnManager
a field with the actual number of connections
LGTM! Thanks for it! 💯 Nevertheless, I wonder if we could also indicate the number of used/occupied connections
So I thought about it at first but didn't do it because of the existence of the following proc
Which means that the number of connections is not necessarily
maximum - used
and I didn't see inConnManager
a field with the actual number of connections
ah okay, I was thinking that maybe we can use: c.outSema.queue.len
ah okay, I was thinking that maybe we can use:
c.outSema.queue.len
I understood that the queue is for connections waiting for an available slot, not existing connections. But let's see what @diegomrsantos says :))
@gabrielmer Thank you for improving this. Regarding your question, I don't know this part of the lib.
Running into the following log
The
count
parameter is a little bit misleading and at first makes one think that there's 0 connections. Looking at the code I see that it refers to thecount
field fromAsyncSemaphore
which indicates the available slots.Changed the logging from
count
toavailable
to avoid confusion, same as it is done in the semaphore module. For example https://github.com/vacp2p/nim-libp2p/blob/02f6e6127cecf5b87ff027780be42e9b692a0db9/libp2p/utils/semaphore.nim#L38