search

Home  >  Q&A  >  body text

python多线程或者多进程读取json 文件?

可以给个思路,感觉不知道怎么读取

伊谢尔伦伊谢尔伦2777 days ago756

reply all(3)I'll reply

  • PHP中文网

    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.

    reply
    0
  • PHPz

    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!

    reply
    0
  • 高洛峰

    高洛峰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)

    reply
    0
  • Cancelreply