3 ms·
> Poorly designed code will perform poorly. Well designed code won’t have delay problems. If I need to open and close 20 files every few seconds, and they all
by Dylan16807 5y ago
> Poorly designed code will perform poorly. Well designed code won’t have delay problems.
If I need to open and close 20 files every few seconds, and they all might have unpredictable latencies, even the best designed code in the world could have delay problems.
> Where in this entire thread was it suggested to spawn a thread per file?
You just implied that checking all the files on a dedicated thread is still 'poorly designed code', didn't you?
So if a dedicated thread for the whole group of files isn't enough, sounds like you need to move to a thread per file. Unless it's wrong to use close() at all, or something? You can only blame the code so much.