Commit 04e7032c authored by Guido van Rossum's avatar Guido van Rossum

SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (Daniel

Dunbar)

Can't test this, but looks correct to me.
parent 0c322796
......@@ -379,8 +379,10 @@ Py_AddPendingCall(int (*func)(void *), void *arg)
busy = 1;
i = pendinglast;
j = (i + 1) % NPENDINGCALLS;
if (j == pendingfirst)
if (j == pendingfirst) {
busy = 0;
return -1; /* Queue full */
}
pendingcalls[i].func = func;
pendingcalls[i].arg = arg;
pendinglast = j;
......
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