Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup execOnMany and allow it to be used in both sloppy and non-slo…
…ppy mode The execOnMany function was able to exit prematurely, leaving its child goroutines running. These would write to a channel that closed after execOnMany returned in findProvidersAsyncRoutine. The function is now able to run both in a sloppy mode where it allows goroutines to be cleaned up after the function has completed as well a safer non-sloppy mode where goroutines will complete before the function returns. The sloppy mode is used for DHT "get" operations like FindProviders and SearchValues whereas the non-sloppy mode is used for "put" operations like PutValue and Provide (along with their bulk operation equivalents). This fixes ipfs/kubo#8146
- Loading branch information
1 parent
5eb9aaa
commit daab800
Showing
1 changed file
with
58 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters