This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Release the GIL while running a gdb command or expression
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Fri, 12 Oct 2018 17:56:37 +0100
- Subject: Re: [PATCH v2] Release the GIL while running a gdb command or expression
- References: <20181010202233.17985-1-tom@tromey.com>
On 10/10/2018 09:22 PM, Tom Tromey wrote:
> +
> +# Define a function for the thread
While at it, add missing periods?
> +def print_thread_hello():
> + count = 0
> + while count < 10:
> + time.sleep(1)
> + count += 1
> + print ("Hello ( %d )" % count)
> +
> +# Create a thread and continue
Ditto.
> +try:
> + thread.start_new_thread (print_thread_hello, ())
> + gdb.execute ("continue", release_gil=True)
> +except:
> + try:
> + _thread.start_new_thread (print_thread_hello, ())
> + gdb.execute ("continue", release_gil=True)
But what I came here for, is:
AFAICT, "release_gil" was not included in this version of
the patch, so that shouldn't be here either.
The test should be failing because of that, I believe,
because GDB should be complaining that release_gil
is an invalid keyword. Does the test somehow
happen to still pass with that?
> + except:
> + print ("Error: unable to start thread")
Thanks,
Pedro Alves