[Medusa-dev] Error conditions and select()

A.M. Kuchling amk at amk.ca
Wed Jul 7 14:38:25 CEST 2004


Jim Jewett sent me the following in private mail:
===========
In poll(), error_list e is always empty.
Should all items in map be added to e?

        r = []; w = []; e = []
        for fd, obj in map.items():
            if obj.readable():
                r.append(fd)
            if obj.writable():
                w.append(fd)
#       # add this line?
#       #   e.append(fd)
        if [] == r == w == e:
#           # but then maybe not select if e is the only list?
            time.sleep(timeout)

===========

poll2(), which uses select.poll(), calls obj.handle_expt_event() when
the POLLERR bit is set, so it seems natural to do the same in the
select-using version of poll().  Seem reasonable to everyone?

--amk




More information about the Medusa-dev mailing list