問題文
A tool reads one small configuration file at startup, before it accepts any work. Is the synchronous form acceptable here?
選択肢
- Yes, because nothing else is pending at that moment and the simpler code has no cost in responsiveness.
- No, because the synchronous form is always the wrong choice in a server side program and the asynchronous form must be used for every access to the file system.
- No, because a configuration file has to be read through a stream so that a large file does not have to be held in memory at any point during the startup of the tool.
- Yes, because the synchronous form is faster for every size of file that a tool has to read at start up time.