LibUV: Reorder event poll preference

*nix will keep epoll/kqueue/port as the default (when available), while
Windows, lacking all of these, will default to libuv (when available)
pull/70/head
Nils Maier 2013-04-28 21:44:06 +02:00
parent 0cccc2d27a
commit e700ebd3e9
1 changed files with 10 additions and 8 deletions

View File

@ -329,9 +329,6 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
} }
{ {
std::string params[] = { std::string params[] = {
#ifdef HAVE_LIBUV
V_LIBUV,
#endif // HAVE_LIBUV
#ifdef HAVE_EPOLL #ifdef HAVE_EPOLL
V_EPOLL, V_EPOLL,
#endif // HAVE_EPOLL #endif // HAVE_EPOLL
@ -341,6 +338,9 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
#ifdef HAVE_PORT_ASSOCIATE #ifdef HAVE_PORT_ASSOCIATE
V_PORT, V_PORT,
#endif // HAVE_PORT_ASSOCIATE #endif // HAVE_PORT_ASSOCIATE
#ifdef HAVE_LIBUV
V_LIBUV,
#endif // HAVE_LIBUV
#ifdef HAVE_POLL #ifdef HAVE_POLL
V_POLL, V_POLL,
#endif // HAVE_POLL #endif // HAVE_POLL
@ -349,17 +349,19 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
OptionHandler* op(new ParameterOptionHandler OptionHandler* op(new ParameterOptionHandler
(PREF_EVENT_POLL, (PREF_EVENT_POLL,
TEXT_EVENT_POLL, TEXT_EVENT_POLL,
#ifdef HAVE_LIBUV #if defined(HAVE_EPOLL)
V_LIBUV,
#elif defined(HAVE_EPOLL)
V_EPOLL, V_EPOLL,
#elif defined(HAVE_KQUEUE) #elif defined(HAVE_KQUEUE)
V_KQUEUE, V_KQUEUE,
#elif defined(HAVE_PORT_ASSOCIATE) #elif defined(HAVE_PORT_ASSOCIATE)
V_PORT, V_PORT,
#else #elif defined(HAVE_LIBUV)
V_LIBUV,
#elif defined(HAVE_POLL)
V_POLL,
#else // defined(HAVE_EPOLL)
V_SELECT, V_SELECT,
#endif // !HAVE_LIBUV #endif // defined(HAVE_EPOLL)
std::vector<std::string> std::vector<std::string>
(vbegin(params), vend(params)))); (vbegin(params), vend(params))));
op->addTag(TAG_ADVANCED); op->addTag(TAG_ADVANCED);