Article View: borland.public.cppbuilder.nativeapi
Article #9417Re: Sleep() doesn't work as I'd expect
From: Alan Bellingham
Date: Mon, 12 Jul 2004 09:08
Date: Mon, 12 Jul 2004 09:08
15 lines
1614 bytes
1614 bytes
"Chris Phillips" <chris.phillips@corusgroup.com> wrote: >No, there are no mutexes or anything to protect the buffer. The Comms thread >is the only thing writing to it (it's circular btw) and the main thread is >the only thing reading from it. So how do you expect to protect the reading thread from reading a half-written buffer entry? _Unless_ you only have a single thread accessing the buffer, or _unless_ every single thread is only reading it, you need some protection. Alan Bellingham -- ACCU Conference 2005 - 20-23 April, Randolph Hotel, Oxford, UK
Technical Details
Message-ID:
<36l4f09t2v3s9mb9gf7g36pu0k7aojgpke@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40eea7bc@newsgroups.borland.com> <40eeb624$1@newsgroups.borland.com> <40f24e6d@newsgroups.borland.com> <40f2522a$1@newsgroups.borland.com> <40f252c7@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f4373c97b27dc766 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Sleep() doesn't work as I'd expect Date: Mon, 12 Jul 2004 10:08:40 +0100 Reply-To: alanb@episys.com Message-ID: <36l4f09t2v3s9mb9gf7g36pu0k7aojgpke@4ax.com> References: <40eea7bc@newsgroups.borland.com> <40eeb624$1@newsgroups.borland.com> <40f24e6d@newsgroups.borland.com> <40f2522a$1@newsgroups.borland.com> <40f252c7@newsgroups.borland.com> X-Newsreader: Forte Agent 2.0/32.646 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.130 X-Trace: newsgroups.borland.com 1089623319 193.129.251.130 (12 Jul 2004 02:08:39 -0700) Lines: 15 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail