Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #85591
| Path | csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: Multithreaded Programming : Always use spinlocks for performance? |
| Date | Sun, 24 Jul 2022 11:38:51 -0700 |
| Organization | None to speak of |
| Lines | 20 |
| Message-ID | <87v8rmz77o.fsf@nosuchdomain.example.com> (permalink) |
| References | <ccb52fa0-5627-4002-8697-d577b90dab1bn@googlegroups.com> <tbjnbj$m05c$1@dont-email.me> <tbjp5n$memv$1@dont-email.me> <8d6a4871-4c9c-405a-81ad-374a6899cc94n@googlegroups.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader01.eternal-september.org; posting-host="82df9bf89012dbb95e5b496a6f66eb7c"; logging-data="801725"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//pZzqZrCVx9EUucLWpCCU" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
| Cancel-Lock | sha1:10uaTxbism0tYPE/9jFBKf9q/58= sha1:HuWYJn4ek44+8WadJGPIomr8fgk= |
| Xref | csiph.com comp.lang.c++:85591 |
Show key headers only | View raw
Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> writes:
[...]
> void Entry_Point_For_Worker_Thread(void)
> {
> for (;;)
> {
> while ( false == g_should_process_data ); // <-- This is what I mean when I say 'spin lock'
>
> /* Process data */
> }
> }
[...]
Not relevant to your question, but why would you write
`false == g_should_process_data` rather than `! should_process_data`?
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Multithreaded Programming : Always use spinlocks for performance? Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2022-07-24 06:31 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? Bo Persson <bo@bo-persson.se> - 2022-07-24 15:53 +0200
Re: Multithreaded Programming : Always use spinlocks for performance? Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-24 16:42 +0200
Re: Multithreaded Programming : Always use spinlocks for performance? Paavo Helde <eesnimi@osa.pri.ee> - 2022-07-24 18:09 +0300
Re: Multithreaded Programming : Always use spinlocks for performance? Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-24 17:41 +0200
Re: Multithreaded Programming : Always use spinlocks for performance? Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2022-07-24 09:20 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? Paavo Helde <eesnimi@osa.pri.ee> - 2022-07-24 19:34 +0300
Re: Multithreaded Programming : Always use spinlocks for performance? Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-24 18:57 +0200
Re: Multithreaded Programming : Always use spinlocks for performance? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-24 11:38 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-07-24 13:17 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? Öö Tiib <ootiib@hot.ee> - 2022-07-25 03:21 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-24 19:01 +0200
Re: Multithreaded Programming : Always use spinlocks for performance? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-07-24 13:20 -0700
Re: Multithreaded Programming : Always use spinlocks for performance? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-07-24 16:55 -0700
csiph-web