On 20/01/2018 11:55, Thomas Jollans wrote: > control is returned to t.resume. nonblocking_accept is supposed to be a > coroutine > Ergo, it schedules the nonblocking_accept coroutine (‘value’) to be > called on the next iteration, and keeps the running listen_on coroutine > (‘coroutine’) on the stack for safekeeping.
Hello Thomas, I missed THE point of the examples. nonblocking_accept is a coroutine. I was stuck in the C way of doing non blocking, and I was wondering what was the magic behind the examples. Perfect explanation, now I understand. Still, I also wonder how theses "nonblocking_" functions are meant to be implemented. But it's another topic. Thanks. -- https://mail.python.org/mailman/listinfo/python-list