vendredi 10 avril 2015

Reading/Writing the same csv with two different version of a program


Vote count:

0




I have a program that conduct survey, and then will generate two CSV files, one will contains the answer to the actual questions, the other one will contains demographic information of the participants. ( The program will only writes (flush) to the files at the end of the survey)


Right now, it will assign each new file with a subject number by looking up the demographic file and see how many people completed the survey. For example if there is n lines in the demographic file, the person will have a number of n-1 (the first line one being the columns name).


The problem is: I'm trying to run them on 2 different machines ( there'll be two version of the program, but only 1 version for the resultfiles), the files will be on a shared folder. Obviously, if we have two people start the program at the same time, they'll end up having the same subject number. How can I fix that issue ? Thank you in advance !



asked 1 min ago







Reading/Writing the same csv with two different version of a program

Aucun commentaire:

Enregistrer un commentaire