lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 31 August 2018 at 14:59, Russell Haley <russ.haley@gmail.com> wrote:
> The cqueues author William Ahern made the suggestion to use wepoll[1]

I do not recall this; do you have a citation?

> My working assumption (from Mr. Ahern) is that if I can get the base cqueues/src/lib/ library working with sockets, we have a fair shot of getting lua-http on Windows. So, this effort is strictly about compiling src/lib so far.

That is not the biggest blocker. Infact aside from kpoll.c the things
in src/lib should already compile for windows.

> I included wepoll.c/h and queue.h (from freebsd 10) in kpoll.c, which seems to be the guts of the polling library.

Currently kpoll.c is unused! See https://github.com/wahern/cqueues/issues/24

> Much of the epoll calls compile(?), but the code paths defined under PORTS and #else don't compile so I've just commented them all out (whack!). I've included a git patch and my build output can be found here: https://pastebin.com/9hLSpzGL.

That doesn't really make sense. the epoll vs ports code paths are
alternatives selected with the C preprocessor, it's not possible to
use both.


-------------------

The large task of porting cqueues to windows is well documented in
https://github.com/wahern/cqueues/issues/35

The lowest-common-denominator way forward seems to be following
https://github.com/wahern/cqueues/pull/185
which is to allow :pollfd() to return an fd *set*.

A different way to do things would be to write a windows thead-based
epoll implemention. This requires someone with deep win32 and nt.dll
knowledge.

I haven't pursued either of these due to time constraints and the
simple answer that I don't use windows, so I wouldn't be developing
for myself.