Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #191
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Alexander Terekhov <terekhov@web.de> |
| Newsgroups | comp.programming.threads |
| Subject | Re: cond signal wait |
| Date | Wed, 25 May 2011 19:16:00 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 29 |
| Message-ID | <4DDD3950.81DEDF32@web.de> (permalink) |
| References | <bff468ff-45d7-4e18-8ff5-95238eb94585@c1g2000yqe.googlegroups.com> <87aaebte7o.fsf@justsoftwaresolutions.co.uk> <98cd47de-73d9-48e9-ac18-cc01cac1bb48@z7g2000prh.googlegroups.com> <87lixubzfu.fsf@justsoftwaresolutions.co.uk> <a05141df-cede-4929-9e8d-4b9394fd6858@22g2000prx.googlegroups.com> <87hb8ibwur.fsf@justsoftwaresolutions.co.uk> |
| Reply-To | terekhov@web.de |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx04.eternal-september.org; posting-host="MCbSEzW5qwGLFMNXJh39IQ"; logging-data="4807"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dxsm2m3JBFmJo4O6ydtHj2cOAGp7tb1I=" |
| X-Mailer | Mozilla 4.77 [en] (Windows NT 5.0; U) |
| X-Accept-Language | en |
| Cancel-Lock | sha1:GqmenhkXAzDCUVl6Qjs1cEvnw5E= |
| Xref | x330-a1.tempe.blueboxinc.net comp.programming.threads:191 |
Show key headers only | View raw
Anthony Williams wrote:
[...]
> void signaller()
> {
> lock mutex;
> // if we get here, waiter() hasn't yet executed **A**
> // or is blocked in **B**, so will be woken by signal
> // or has executed line **C** so doesn't care about signal
> mark data as ready;
> signal condvar;
> unlock mutex;
> }
lock mutex;
// if we get here, waiter() hasn't yet executed **A**
// or is blocked in **B**, so will be woken by signal
// or has executed line **C** so doesn't care about signal
mark data as ready;
unlock mutex;
signal condvar;
is the regular case.
signalling prior to unlock is special.
regards,
alexander.
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cond signal wait p6 c6d6 <p6c6d6@gmail.com> - 2011-05-24 18:56 -0700
Re: cond signal wait Anthony Williams <anthony.ajw@gmail.com> - 2011-05-25 08:46 +0100
Re: cond signal wait p6 c6d6 <p6c6d6@gmail.com> - 2011-05-25 05:44 -0700
Re: cond signal wait Anthony Williams <anthony.ajw@gmail.com> - 2011-05-25 15:57 +0100
Re: cond signal wait p6 c6d6 <p6c6d6@gmail.com> - 2011-05-25 08:34 -0700
Re: cond signal wait Anthony Williams <anthony.ajw@gmail.com> - 2011-05-25 16:53 +0100
Re: cond signal wait Alexander Terekhov <terekhov@web.de> - 2011-05-25 19:16 +0200
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-26 09:51 -0700
Re: cond signal wait Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-26 14:48 -0700
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-26 23:20 -0700
Re: cond signal wait Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-27 14:50 -0700
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-27 15:15 -0700
Re: cond signal wait Alexander Terekhov <terekhov@web.de> - 2011-05-28 15:48 +0200
Re: cond signal wait Alexander Terekhov <terekhov@web.de> - 2011-05-27 16:01 +0200
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-27 12:34 -0700
Re: cond signal wait Alexander Terekhov <terekhov@web.de> - 2011-05-28 14:24 +0200
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-29 01:33 -0700
Re: cond signal wait Alexander Terekhov <terekhov@web.de> - 2011-05-31 15:32 +0200
Re: cond signal wait David Schwartz <davids@webmaster.com> - 2011-05-31 14:07 -0700
csiph-web