Hi,
I have created a Mojo::Server::Threaded to be mainly usable in Windows
environments where Mojo::Server::Prefork is not available. I just started with Mojo::Server::Prefork
and exchanged the fork and pipe with threads and queues. The changes are not that extensive.
A proof of concept is running nicely so far, but I had to make two small changes to
Mojo::Server::Daemon and Mojo::IOLoop::Server because Windows threads have to reopen
the socket from the file descriptor of the first listener.
The purpose of the changes is to add a new attribute (e.g. 'use_fd') to Mojo::Server::Daemon
that will be passed as argument to listen() in Mojo::IOLoop::Server. Creating the socket from
the file descriptor is already implemented for the 'reuse' functionality, so that was trivial.
Before I invest more work into that, it would be good to know whether this is something that
could be integrated in future releases. Otherwise this would be futile.
The goal is to either have a working hypnotoad under windows or to have an
alternative for that. Since the interface is identical this could be a dropin replacement for
Mojo::Server::Prefork.
Thomas