Closed pitdicker closed 6 years ago
Pertinent question: do we want to share file-handles instead of re-opening?
My gut reaction is that sharing file descriptors is only a win, since it'll take some load off the OS. I know there are some considerations around having a bunch of descriptors allocated at once, but I'm not an expert here.
@nixpulvis that was a rhetorical question (we already discussed to some extent). PRs welcome BTW.
I see some comments that file descriptors to the same file get reference counted on the kernel side across multiple threads. Then it may not make any difference if we start to reference count them on our side instead. But this would need some testing to be sure.
Once I fix the merge conflict, is this ok to be merged?
I don't see any advantage to removing ReadRng
(a very slight reduction in complexity maybe, but it's marginal). OTOH if further changes get made to this code in the future the extra layer of abstraction may be useful. So it seems like a step backwards removing it, even though it's not necessary.
I feel the abstraction was not worth it.