Open ebonetti opened 9 years ago
Are you ok with the cache being unusable once Stop
is called? Is panic'ing a little extreme or acceptable?
Consider: https://github.com/karlseguin/ccache/commit/bfa769c6b6c794afa640d7259ebc270c7da037a7
Edited: there is a big problem with "deletables" channel: goroutines waiting to pass values are blocked.. In "worker", just before exiting goroutine, the Cache should be cleared (enforcing user to stop using it) and then close "deletables". This way it panics on both channel on a send attempt, but in my opinion panicking isn't right.. Enrico
Goroutine (associated with cache worker) prevent cache from being collected. In my opinion there should be a way to stop it. Alternatively, this fact should be documented.
Keep up the good work, Enrico