From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>,
Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][gdbsupport] Add sequential_for_each
Date: Fri, 15 Jul 2022 18:44:34 +0200 [thread overview]
Message-ID: <ef2b746f-3ed5-5213-ed19-55909f5b0c8c@suse.de> (raw)
In-Reply-To: <87r12mpbz9.fsf@tromey.com>
On 7/15/22 18:38, Tom Tromey wrote:
> Tom> Add a sequential_for_each alongside the parallel_for_each, which can be used
> Tom> as a drop-in replacement.
>
> Tom> This can be useful when debugging multi-threading behaviour, and you want to
> Tom> limit multi-threading in a fine-grained way.
>
> It's not fine-grained but I typically just set the number of worker
> threads to 0.
FWIW, the use case I'm using it for atm is developing some code that
introduces a new parallel_for_each, and then switching some existing
parallel_for_each back to sequential to limit the race conditions I'm
going to run into to a certain scope.
Thanks,
- Tom
prev parent reply other threads:[~2022-07-15 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 13:20 Tom de Vries
2022-07-14 15:02 ` [comitted][gdbsupport] " Tom de Vries
2022-07-15 16:38 ` [PATCH][gdbsupport] " Tom Tromey
2022-07-15 16:44 ` Tom de Vries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef2b746f-3ed5-5213-ed19-55909f5b0c8c@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).