[svn r41606] Rather strange hack to make sure that queue is not empty. Needed nowadays for
passing test_session in js/examples/console --HG-- branch : trunk
This commit is contained in:
parent
a86118d77b
commit
9466961ee4
|
@ -449,13 +449,17 @@ def dispatcher_mainloop():
|
||||||
d = g_owtd[s]
|
d = g_owtd[s]
|
||||||
#print 'owtd:', d[0]
|
#print 'owtd:', d[0]
|
||||||
# XXX: Check if d is non-empty
|
# XXX: Check if d is non-empty
|
||||||
g = d.popleft()
|
try:
|
||||||
|
g = d.popleft()
|
||||||
|
except IndexError:
|
||||||
|
g = None
|
||||||
if not d:
|
if not d:
|
||||||
try:
|
try:
|
||||||
del g_owtd[s]
|
del g_owtd[s]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
g.switch(g_owtd)
|
if g:
|
||||||
|
g.switch(g_owtd)
|
||||||
# if g.dead:
|
# if g.dead:
|
||||||
# check_waiters(g)
|
# check_waiters(g)
|
||||||
for s in iwtd:
|
for s in iwtd:
|
||||||
|
@ -463,13 +467,17 @@ def dispatcher_mainloop():
|
||||||
d = g_iwtd[s]
|
d = g_iwtd[s]
|
||||||
#print 'iwtd:', d[0]
|
#print 'iwtd:', d[0]
|
||||||
# XXX: Check if d is non-empty
|
# XXX: Check if d is non-empty
|
||||||
g = d.popleft()
|
try:
|
||||||
|
g = d.popleft()
|
||||||
|
except IndexError:
|
||||||
|
g = None
|
||||||
if not d:
|
if not d:
|
||||||
try:
|
try:
|
||||||
del g_iwtd[s]
|
del g_iwtd[s]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
g.switch(g_iwtd)
|
if g:
|
||||||
|
g.switch(g_iwtd)
|
||||||
# if g.dead:
|
# if g.dead:
|
||||||
# check_waiters(g)
|
# check_waiters(g)
|
||||||
except GreenletExit:
|
except GreenletExit:
|
||||||
|
|
Loading…
Reference in New Issue