The Stdin::read_line can be used data line-by-line, however it will release the lock between each line. Alternately you can lock stdin using Stdin::lock and read lines with a BufReader.
这句解释看不懂,是说加了lock后,保证buffer不发生变化,如果不带lock,buffer可能会因为更新的输入而变化?
--
FROM 218.66.91.*