From: Tom Tromey <tromey@redhat.com>
To: sami wagiaalla <swagiaal@redhat.com>
Cc: Project Archer <archer@sourceware.org>
Subject: Re: [[inferior events] partial cleanup for copy_py_list
Date: Wed, 15 Dec 2010 16:42:00 -0000 [thread overview]
Message-ID: <m3y67rm1i3.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4D08E57D.4000200@redhat.com> (sami wagiaalla's message of "Wed, 15 Dec 2010 10:57:49 -0500")
Tom> I think it should probably use an iterator to go through the list.
Tom> Otherwise it is susceptible to a bug where another thread changes the
Tom> list while we are iterating over it.
Sami> Hmm I did not know we had the option of using a safe iterator. If we
Sami> do then that eliminates the need for copy_py_list in the first place;
Sami> copy_py_list is used to make the call back of listeners safe against
Sami> one listener editing the list during the iteration by removing an
Sami> element.
TBH, I am not totally sure how things work in this area.
One option would be to use the existing convenience function
PyList_AsTuple, and just trust the Python core to get it right.
Tom
prev parent reply other threads:[~2010-12-15 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 21:41 Tom Tromey
2010-12-15 15:57 ` sami wagiaalla
2010-12-15 16:42 ` 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=m3y67rm1i3.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=archer@sourceware.org \
--cc=swagiaal@redhat.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).