Ok.. in perl there was good ol' fashioned flock, and I was intermediate level at perl for a while, hated it, wished for a structured language like html with perl's capabilities.. now I've got it, heh.. but back on subject, flock, as I understood it, locked a file until the flocked process was done...
Can CF do that? Is there a custom tag? I have a script that writes to/reads from as many as three text files at a time or as little as 0, but today I got a file sharing violation on the scripts second run.. It COULD be just a fluke that's one in a million, and I just happened to get it on the second run, but I wanna protect it from doing it again...
Here's the schematic, there are 30 lists to select from, each list is in a different text file.. any user can select from any of the lists and save to their own lists.. The process only changes the file and runs the 2 ton queries if the files are changed.. otherwise the script loads fast.. But each user saves to two lists, when they save to one, they automatically save to the other (sounds funky, I know, but the data is displayed in two different ways).
Anyway, it has to be done this way because the 256k connection speed dev server that's up delivered the page in 18 seconds, now with the text file writing, it delivers in two.. oddly even when the queries run.. but as the point of this post is, how can I lock the files so that users (novice exxagerates their internet use talents) can get along with the script.. how might cfcatch/cftry be able to help here? Or what can?
Thanks,
Tony Hicks
Can CF do that? Is there a custom tag? I have a script that writes to/reads from as many as three text files at a time or as little as 0, but today I got a file sharing violation on the scripts second run.. It COULD be just a fluke that's one in a million, and I just happened to get it on the second run, but I wanna protect it from doing it again...
Here's the schematic, there are 30 lists to select from, each list is in a different text file.. any user can select from any of the lists and save to their own lists.. The process only changes the file and runs the 2 ton queries if the files are changed.. otherwise the script loads fast.. But each user saves to two lists, when they save to one, they automatically save to the other (sounds funky, I know, but the data is displayed in two different ways).
Anyway, it has to be done this way because the 256k connection speed dev server that's up delivered the page in 18 seconds, now with the text file writing, it delivers in two.. oddly even when the queries run.. but as the point of this post is, how can I lock the files so that users (novice exxagerates their internet use talents) can get along with the script.. how might cfcatch/cftry be able to help here? Or what can?
Thanks,
Tony Hicks