Follow up from #369 (#369 (comment)).
With ExpiringCache.Config.loadingTimeout = 100ms and a getOrUpdate(IO.never) in flight, both clear and the release of the cache resource hang. clear unlinks the entries before awaiting the loads, so the cleanup routine never sees them, and on release the routine is already cancelled before the clear runs. The release finalizer is uncancelable, so it can't even be timed out from outside.
Currently documented as a limitation in Config.loadingTimeout, LoadingCache.clear and the README (60b3bf2).
To fix it the loading fiber needs to tell "removed" apart from "cleared", and the release finalizers need reordering so the timeout can still apply. Should come with a test: clear/release with a stuck load and loadingTimeout set.
Follow up from #369 (#369 (comment)).
With
ExpiringCache.Config.loadingTimeout = 100msand agetOrUpdate(IO.never)in flight, bothclearand the release of the cache resource hang.clearunlinks the entries before awaiting the loads, so the cleanup routine never sees them, and on release the routine is already cancelled before the clear runs. The release finalizer is uncancelable, so it can't even be timed out from outside.Currently documented as a limitation in
Config.loadingTimeout,LoadingCache.clearand the README (60b3bf2).To fix it the loading fiber needs to tell "removed" apart from "cleared", and the release finalizers need reordering so the timeout can still apply. Should come with a test: clear/release with a stuck load and
loadingTimeoutset.