Merge pull request #2768 from filecoin-project/fix/add-explanation

Fix/add explanation
This commit is contained in:
Whyrusleeping 2020-08-01 16:59:20 -07:00 committed by GitHub
commit 43491cb7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,6 +243,10 @@ func (mp *MessagePool) Close() error {
} }
func (mp *MessagePool) Prune() { func (mp *MessagePool) Prune() {
//so, its a single slot buffered channel. The first send fills the channel,
//the second send goes through when the pruning starts,
//and the third send goes through (and noops) after the pruning finishes
//and goes through the loop again
mp.pruneTrigger <- struct{}{} mp.pruneTrigger <- struct{}{}
mp.pruneTrigger <- struct{}{} mp.pruneTrigger <- struct{}{}
mp.pruneTrigger <- struct{}{} mp.pruneTrigger <- struct{}{}