mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-07 15:23:08 +00:00
improved comment about global validation throttle
This commit is contained in:
parent
cb365a5fee
commit
fceb00d234
@ -373,7 +373,10 @@ func (p *PubSub) pushMsg(subs []*Subscription, src peer.ID, msg *Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if needval {
|
if needval {
|
||||||
// validation is asynchronous and globally throttled with the throttleValidate semaphore
|
// validation is asynchronous and globally throttled with the throttleValidate semaphore.
|
||||||
|
// the purpose of the global throttle is to bound the goncurrency possible from incoming
|
||||||
|
// network traffic; each subscription also has an individual throttle to preclude
|
||||||
|
// slow (or faulty) validators from starving other topics; see validate below.
|
||||||
select {
|
select {
|
||||||
case p.validateThrottle <- struct{}{}:
|
case p.validateThrottle <- struct{}{}:
|
||||||
go func() {
|
go func() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user