Article View: borland.public.cppbuilder.nativeapi
Article #6356Re: Response now in que!
From: Bob Gonder
Date: Wed, 18 May 2005 18:25
Date: Wed, 18 May 2005 18:25
19 lines
1820 bytes
1820 bytes
Neil P. wrote: >I do have a question, why would you need WaitForSingleObject, if you can >specify a timeout for the read and write using the Read or Write >TotalTimeoutConstant? Different way of doing the same thing. Difference is if you have other things to do while waiting for file i/o, or whether blocking is acceptable. In your case, you really wanted to hang around and wait for the data, so blocking was fine. (Data was more important than time, to a point) Other people might have better things to do than wait around for something to eventually come in, and so use overlapped with long read timeouts, but zero or very small WaitFor timeouts. (Time more important than data). Also, with very long and uncertain reads, if the application decides to close, the thread isn't blocked and can terminate readily.
Technical Details
Message-ID:
<ff1n81h8tdkictk8v9bq5f94msgvjrtds1@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!news-hog.berkeley.edu!ucberkeley!192.50.8.47.MISMATCH!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<428b7a3c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d1620a64974f517d X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Response now in que! Date: Wed, 18 May 2005 11:25:30 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ff1n81h8tdkictk8v9bq5f94msgvjrtds1@4ax.com> References: <428b7a3c$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.144.171 X-Trace: newsgroups.borland.com 1116440729 67.77.144.171 (18 May 2005 11:25:29 -0700) Lines: 21 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!news-hog.berkeley.edu!ucberkeley!192.50.8.47.MISMATCH!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail