Closed cofinalsubnets closed 1 year ago
Sorry merged #70 and then saw your comment. I reverted #70 back from the master.
Could you please rebase your changes on top of master
and then squash it into one commit for easier review.
cc @Focshole for the review
It took me a bit of time to review the code since i didn't knew go channel constructs. It looks perfect to me! No more concurrency issues in a safe and easy to read manner!
I'll adapt my PR onto this work
Thank you for your feedback @Focshole. I will move ahead and merge this change.
@gw000 one more request. Could you please add more information to the commit description? Currently, the commit message is only use channels to sync requests to mirrorlist repos
, but having more explanation of why the change was done will be useful in the future.
@anatol I added some details to the commit message, let me know if anything is missing.
@Focshole Sorry to make you review twice! I hadn't used channels before either. Thank you for this learning opportunity :smile:
Awesome, thank you for your work @gw000 !
Hi again, i hope i'm not making too many pull requests. Although i think #70 does solve the mirrorlist concurrency bugs, i still thought it was kind of ugly. This is an alternate implementation using channels instead of mutexes which removes all explicit locking. It also simplifies
pacoloco.go
by moving all the mirrorlist updates and repo case analysis (URL
/URLs
/Mirrorlist
) behind the channel you ask for URL lists on. I think it's a better solution and i'll close #70 if you agree.