Commit c9427dcc authored by Denis Bilenko's avatar Denis Bilenko

select: name arguments the same way as they called in stdlib

parent ed49d7b1
...@@ -17,9 +17,9 @@ def get_fileno(obj): ...@@ -17,9 +17,9 @@ def get_fileno(obj):
return fileno_f() return fileno_f()
def select(read_list, write_list, error_list, timeout=None): def select(rlist, wlist, xlist, timeout=None):
"""An implementation of :meth:`select.select` that blocks only the current greenlet.""" """An implementation of :meth:`select.select` that blocks only the current greenlet."""
# QQQ error_list is ignored # QQQ xlist is ignored
hub = get_hub() hub = get_hub()
current = getcurrent() current = getcurrent()
assert hub is not current, 'do not call blocking functions from the mainloop' assert hub is not current, 'do not call blocking functions from the mainloop'
...@@ -33,10 +33,10 @@ def select(read_list, write_list, error_list, timeout=None): ...@@ -33,10 +33,10 @@ def select(read_list, write_list, error_list, timeout=None):
else: else:
current.switch(([], [], [])) current.switch(([], [], []))
for r in read_list: for readfd in rlist:
allevents.append(core.read_event(get_fileno(r), callback, arg=r)) allevents.append(core.read_event(get_fileno(readfd), callback, arg=readfd))
for w in write_list: for writefd in wlist:
allevents.append(core.write_event(get_fileno(w), callback, arg=w)) allevents.append(core.write_event(get_fileno(writefd), callback, arg=writefd))
timeout = Timeout.start_new(timeout) timeout = Timeout.start_new(timeout)
try: try:
......
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