From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64302 invoked by alias); 30 May 2019 14:01:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 64219 invoked by uid 89); 30 May 2019 14:00:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:600, proof X-HELO: mail-wm1-f65.google.com Received: from mail-wm1-f65.google.com (HELO mail-wm1-f65.google.com) (209.85.128.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 May 2019 14:00:56 +0000 Received: by mail-wm1-f65.google.com with SMTP id u78so4050306wmu.5 for ; Thu, 30 May 2019 07:00:56 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:4eeb:42ff:feef:f164? ([2001:8a0:f913:f700:4eeb:42ff:feef:f164]) by smtp.gmail.com with ESMTPSA id r8sm3945507wrr.63.2019.05.30.07.00.53 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 07:00:54 -0700 (PDT) Subject: Re: [PATCH v3 5/8] Introduce run_on_main_thread To: Tom Tromey References: <20190529212916.23721-1-tom@tromey.com> <20190529212916.23721-6-tom@tromey.com> <9f9ea56d-349f-dc19-6201-9241fee71e49@redhat.com> <87h89cw02c.fsf@tromey.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <43e91740-f259-32d5-eb7b-16c3c2ffdb8d@redhat.com> Date: Thu, 30 May 2019 14:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <87h89cw02c.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-05/txt/msg00693.txt.bz2 On 5/30/19 2:20 PM, Tom Tromey wrote: > Pedro> Can Python's gdb.post_event be built on top of this? > Pedro> It would fix that nasty "atomically enough" race in gdbpy_run_events, > Pedro> I guess. > > Yes, and actually I wrote a patch to do this once, but I dropped it from > this series because it was unrelated. Forgot to say: I wouldn't call it unrelated. You could use it as yet-another proof that run_on_main_thread is a useful abstraction, which even fixes a race/bug. I'd be happy to see such a patch. ( but no rush :-) ) Thanks, Pedro Alves