A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-August/016726.html below:

[Python-Help] Python threads with suncc (Forte 6.1) compiler

[Python-Dev] FW: [Python-Help] Python threads with suncc (Forte 6.1) compiler [Python-Dev] FW: [Python-Help] Python threads with suncc (Forte 6.1) compilerTim Peters tim.one@home.com
Sun, 5 Aug 2001 18:50:06 -0400
[Michael Hudson]
> ...
> (1) Doesn't the Python fileno() method issue leave you open to
> ridiculous fileno() methods that mutate the list passed in to
> select()?

Yes, but that's par for the course, and selectmodule is suitably paranoid
about it (unfortunately, this is *so* common in the implementation that it's
rarely mentioned in comments -- so there's a real danger of "simplifying"
seemingly overly-elaborate code into creating a hole).  list2set() is
unusual in letting PyList_GetItem catch it, though:

	int len = PyList_Size(list);
	...
	for (i = 0; i < len; i++)  {
		SOCKET v;

		/* any intervening fileno() calls could decr this refcnt */
		if (!(o = PyList_GetItem(list, i)))
                    return -1;
		Py_INCREF(o);

It's more common to see

	for (i = 0; i < PyList_Size(list); i++)  {

i.e. to recompute the list length on each trip, and so silently ignore
length-changing mutations.

> (2) AIUI,

New one on me!

at-least-as-i-understand-it<wink>-ly y'rs  - tim




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4