🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8985

Re: Wait for "signal" from another application and/or thread

#8985
From: Eugene Mayevski [SecureBlackbox]
Date: Fri, 13 Aug 2004 20:19
16 lines
1819 bytes
Bob Gonder wrote:

>>How to make sure that each and every one of the waiting thread be signalled?
> You already create the event to not reset, so if you don't reset the
> event in your thread code, then all threads will get the event signal.

If the event is auto-reset, they will get it either anyway. The 
difference between semaphore and event is that semaphore awakes one 
listener and decrements semaphore by 1. And event awakes all listeners 
and then is reset. So the OP should use semaphores.

-- 
Eugene Mayevski
EldoS Corp., CTO
Networking and security solutions, development and consulting services
http://www.eldos.com
Technical Details
Message-ID: <411d2245@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4105617c$1@newsgroups.borland.com> <4105777f$3@newsgroups.borland.com> <411ccf89@newsgroups.borland.com> <gnsph0pq4c8mfhapah6cideqmbp6gqor5r@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b6552239fe09c315
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 13 Aug 2004 23:19:08 +0300
From: "Eugene Mayevski [SecureBlackbox]" <mayevski@eldos.org>
Organization: EldoS Corporation
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, ru, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Wait for "signal" from another application and/or thread 
References: <4105617c$1@newsgroups.borland.com> <4105777f$3@newsgroups.borland.com> <411ccf89@newsgroups.borland.com> <gnsph0pq4c8mfhapah6cideqmbp6gqor5r@4ax.com>
In-Reply-To: <gnsph0pq4c8mfhapah6cideqmbp6gqor5r@4ax.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 82.144.222.199
Message-ID: <411d2245@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092428357 82.144.222.199 (13 Aug 2004 13:19:17 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail