NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
341 stars 57 forks source link

Remove the cache state machine and loop. #282

Closed ximon18 closed 6 months ago

ximon18 commented 6 months ago

PoC draft PR to better demonstrate my idea regarding review feedback on PR #275.

ximon18 commented 6 months ago

Thanks @Philip-NLnetLabs, appreciated. I'm not sure what you mean by the prefetching comment but I assume that's just me missing something. I also overlooked the issue of preserving state across .await boundaries to avoid state loss on future cancellation. I will at some other moment see if I can find a different way to make the code, to me at least, easier to read.