wahern / cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.
http://25thandclement.com/~william/projects/cqueues.html
MIT License
248 stars 37 forks source link

Way to externalise polling operation #185

Open daurnimator opened 7 years ago

daurnimator commented 7 years ago

As noted in https://github.com/wahern/cqueues/issues/35

This PR adds a cqueues object method :pollset which returns 3 tables in list form: fds that it is interested in reading/writing/priority.

daurnimator commented 7 years ago

I wonder if instead, :pollfd should return a userdata that contains the poll set?

After this PR we'll want another one where cqueues.poll with a cq has a special path where :pollset might be used.