public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug dap/31380] [gdb/dap] Ensure responses are flushed to client before exiting
Date: Wed, 21 Feb 2024 09:46:38 +0000	[thread overview]
Message-ID: <bug-31380-4717-Fo3IT8h6oE@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31380-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31380

--- Comment #6 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7c34de9efdb13fff482ed0c4de0dffee1e1880f3

commit 7c34de9efdb13fff482ed0c4de0dffee1e1880f3
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Feb 21 10:46:08 2024 +0100

    [gdb/dap] Join JSON writer thread with DAP thread

    The DAP interpreter runs in its own thread, and starts a few threads:
    - the JSON reader thread,
    - the JSON writer thread, and
    - the inferior output reader thread.

    As part of the DAP shutdown, both the JSON reader thread and the JSON
writer
    thread, as well as the DAP main thread run to exit, but these exits are not
    ordered in any way.

    Wait in the main DAP thread for the exit of the JSON writer thread.

    This makes sure that the responses are flushed to the DAP client before DAP
    shutdown.

    An earlier version of this patch used Queue.task_done() to accomplish the
    same, but that didn't guarantee writing the "<thread name>: terminating"
    log entry from thread_wrapper before DAP shutdown.

    Tested on aarch64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR dap/31380
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31380

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-02-21  9:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 11:23 [Bug dap/31380] New: " vries at gcc dot gnu.org
2024-02-15 18:19 ` [Bug dap/31380] " tromey at sourceware dot org
2024-02-15 18:21 ` tromey at sourceware dot org
2024-02-16 11:46 ` vries at gcc dot gnu.org
2024-02-19  8:25 ` vries at gcc dot gnu.org
2024-02-19  8:43 ` vries at gcc dot gnu.org
2024-02-21  9:46 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-22 10:35 ` cvs-commit at gcc dot gnu.org
2024-02-22 10:40 ` vries at gcc dot gnu.org

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=bug-31380-4717-Fo3IT8h6oE@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).