Article View: borland.public.cppbuilder.nativeapi
Article #2214Re: File Creation and contention
From: Vladimir Stefanovic
Date: Fri, 23 Mar 2007 19:42
Date: Fri, 23 Mar 2007 19:42
25 lines
1772 bytes
1772 bytes
> Unfortunately I meant several separate applications. I cannot say for sure, but why don't you make some contention algorithm. Accessing a Log file should be short-timed operation, so some kind of loop-retry mechanism could help. Every process/app should open exclusively the log file, write a line or few, then exit. In the meanwhile, other processes could try to open exclusively the same file, but that could be possible only when ther processes release the file. Also some type of temp buffering can be considered also. In other words, if a process could not access a file after say 10 retries, let it write the log in a tem file. Other file when the access to a file is gained write temp + current items. -- Best Regards, Vladimir Stefanovic
Technical Details
Message-ID:
<46042dc6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4603628f$1@newsgroups.borland.com> <46039a75@newsgroups.borland.com> <46039f9b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5d20743a8be4a735 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <4603628f$1@newsgroups.borland.com> <46039a75@newsgroups.borland.com> <46039f9b$1@newsgroups.borland.com> Subject: Re: File Creation and contention Date: Fri, 23 Mar 2007 20:42:58 +0100 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 87.116.181.111 Message-ID: <46042dc6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1174678982 87.116.181.111 (23 Mar 2007 12:43:02 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail