Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, monkeyWie, I'm dc
The modifications regarding #176 have been completed.
Using sync.Map would modify the important data structure of Download. The methods involve numerous load operations that require parameters of type any. Retrieving data also requires type checking of the load result, making the code rather cumbersome.
Considering that our primary focus is on the client-side program, simply using sync.RWMutex for locking is sufficient. Even if the server-side is involved, the download methods won't exhibit significant concurrency, and the locking scope is limited to the single write operation of storing data in the map. Therefore, the changes are straightforward.
Lately, I've been studying more about P2P-related aspects. In the upcoming time, I will be making more submissions regarding issues and features within the project. Join to project, thanks.