Kaydet (Commit) e8008f00 authored tarafından Guido van Rossum's avatar Guido van Rossum

I decided to change the interaction between setblocking() and

settimeout().   Already, settimeout() canceled non-blocking mode; now,
setblocking() also cancels the timeout.  This is easier to document.

(XXX should settimeout(0) be an alias for setblocking(0)?  They seem
to have roughly the same effect.  Also, I'm not sure that the code in
connect() and accept() is correct in all cases.  We'll sort this out
soon enough.)
üst 96803b29
......@@ -1086,10 +1086,7 @@ sock_setblocking(PySocketSockObject *s, PyObject *arg)
return NULL;
s->sock_blocking = block;
/* If we're not using timeouts, actually set the blocking to give
old python behavior. */
if (s->sock_timeout < 0.0)
s->sock_timeout = -1.0; /* Always clear the timeout */
internal_setblocking(s, block);
Py_INCREF(Py_None);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment