Ejemplo n.º 1
0
 def send_ack(response, pid, job, fd, WRITE=WRITE, ERR=ERR):
     # Schedule writing ack response for when the fd is writeable.
     msg = Ack(job, fd, precalc[response])
     callback = promise(write_generator_done)
     cor = _write_ack(fd, msg, callback=callback)
     mark_write_gen_as_active(cor)
     mark_write_fd_as_active(fd)
     callback.args = (cor, )
     hub_add((fd, ), cor, WRITE | ERR)
Ejemplo n.º 2
0
 def send_ack(response, pid, job, fd, WRITE=WRITE, ERR=ERR):
     # Schedule writing ack response for when the fd is writeable.
     msg = Ack(job, fd, precalc[response])
     callback = promise(write_generator_done)
     cor = _write_ack(fd, msg, callback=callback)
     mark_write_gen_as_active(cor)
     mark_write_fd_as_active(fd)
     callback.args = (cor, )
     hub_add((fd, ), cor, WRITE | ERR)