Closed guseggert closed 1 year ago
This repository has been moved to https://github.com/ipfs/go-libipfs. There is not an easy way to transfer PRs, so if you would like to continue with this PR then please re-open it in the new repository and link to this PR.
This renames ProviderQueryManager to ProviderQueryer to more clearly reflect what it does.
It also rewrites it to remove the need for running a goroutine pool. Instead, concurrency is limited using a semaphore and locks are used to ensure that only a single query happens under concurrent requests for the same CID. This simplifies the code, makes reading stack traces easier, and removes the need for lifecycle management of the queryer (the only resources that need to be shut down are done so by the request context).
Some other minor changes: