It harkens back to my days as a BBS SysOp. At the time, multitasking was just getting into swing on PCs, but most of the third-party applications (read: games) were strictly single thread. Letting two people into an application at one time would cause all kinds of havok.
It's also used all over. Access *.ldb files, for instance. > -----Original Message----- > From: Rich Wild [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 16, 2002 10:41 AM > To: CF-Talk > Subject: RE: 'Locking' a process > > > hmm, I really like this. Better than my db idea in this instance.... > > nice one. > > > -----Original Message----- > > From: Everett, Al [mailto:[EMAIL PROTECTED]] > > Sent: 16 October 2002 15:41 > > To: CF-Talk > > Subject: RE: 'Locking' a process > > > > > > Use a semaphore or lock file. When someone grabs addams.xml > > for editing, > > write a really small file called addams.lck to the same > > directory. When done > > processing, delete the addams.lck file. Change the process to > > look for the > > existence of a <filename>.lck file and if one exists deny > > access to the > > <filename>.xml file. > > > > You'll need to have a method of clearing old locks, in case > > someone abandons > > the process in the middle. The timestamp on the > > <filename>.lck file should > > be sufficient. I'd think a lock file over eight hours old > ought to be > > considered ignorable. > > > > > -----Original Message----- > > > From: Robertson-Ravo, Neil (REC) > > > [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, October 16, 2002 10:16 AM > > > To: CF-Talk > > > Subject: 'Locking' a process > > > > > > > > > Anyone got any ideas on how to do a pseudo lock on a > > process within an > > > application? > > > > > > My example is that I am reading from an .xml file whose > > > contents can be > > > edited and then updated. I want to be able to lock this > > > process so no other > > > user can overwrite the data while another user is performing > > > the action on > > > it (or at least flag the fact that its open by another process.) > > > . > > > > > > Neil > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

