public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH v2 2/2] Write the DWARF index in the background
Date: Fri, 15 Jul 2022 09:50:11 -0600	[thread overview]
Message-ID: <87o7xqqsss.fsf@tromey.com> (raw)
In-Reply-To: <20220607171002.196132-3-tromey@adacore.com> (Tom Tromey via Gdb-patches's message of "Tue, 7 Jun 2022 11:10:02 -0600")

Tom> +cooked_index_vector::cooked_index_vector (vec_type &&vec,
Tom> +					  dwarf2_per_bfd *per_bfd)
Tom> +  : m_vector (std::move (vec)),
Tom> +    m_write_future (gdb::thread_pool::g_thread_pool->post_task
Tom> +		    ([this, per_bfd] ()
Tom> +		    {
Tom> +		      maybe_write_index (per_bfd);
Tom> +		    }))
Tom>  {
Tom>    for (auto &idx : m_vector)
Tom>      idx->finalize ();

I think this has a race, because the maybe_write_index task can be
started before the finalization tasks are.  When I update this I'll fix
this problem.

Tom

      reply	other threads:[~2022-07-15 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 17:10 [PATCH v2 0/2] Write DWARF index cache files in background Tom Tromey
2022-06-07 17:10 ` [PATCH v2 1/2] Only use the per-BFD object to write a DWARF index Tom Tromey
2022-06-07 17:10 ` [PATCH v2 2/2] Write the DWARF index in the background Tom Tromey
2022-07-15 15:50   ` Tom Tromey [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=87o7xqqsss.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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).