Hello! I’m writing a Qt/c++ program that should write and read data on a file, while another process does the same. What file format should I use to prevent conflicts?

  • @ENipo@lemmy.world
    link
    fedilink
    29 months ago

    No file format will save you by itself since at the end of the day, xml, json, etc they are all plain text.

    One solution would be to use some database (like sqlite if you are just doing things locally on your computer).

    Another solution would be to have a single process that is responsible for writing the data, while all other processes send messages to it via a queue.

    • tubbaduOP
      link
      19 months ago

      I like the solution of the single process, thank you very much!