Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 24284:d8909792005a legacy-trunk
SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (Daniel
Dunbar)
Can't test this, but looks correct to me.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 17 Jul 2002 16:57:13 +0000 |
| parents | c0a67a1cab09 |
| children | d2f41c8a81f0 |
line wrap: on
line diff
--- a/Python/ceval.c Wed Jul 17 16:49:03 2002 +0000 +++ b/Python/ceval.c Wed Jul 17 16:57:13 2002 +0000 @@ -379,8 +379,10 @@ 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;
