PHP中文网2017-04-18 10:24:55
Do you have a very large json file? Do you need to use multiple threads to read? And it reads formatted json data instead of context-free separable data. Your scene is rather strange.
PHPz2017-04-18 10:24:55
This requirement is rather strange!
It is recommended that you don’t use multi-threading if you can!
Because after the file is read, you have to consider how to arrange it in the correct order!
高洛峰2017-04-18 10:24:55
Forcible reading is possible, but it will be troublesome to assemble in the end. It is recommended to divide the appropriate block length according to the length of the file and read it directly with file.read(length)