mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
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)
This commit is contained in:
parent
0cccc2d27a
commit
e700ebd3e9
@ -329,9 +329,6 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
|
||||
}
|
||||
{
|
||||
std::string params[] = {
|
||||
#ifdef HAVE_LIBUV
|
||||
V_LIBUV,
|
||||
#endif // HAVE_LIBUV
|
||||
#ifdef HAVE_EPOLL
|
||||
V_EPOLL,
|
||||
#endif // HAVE_EPOLL
|
||||
@ -341,6 +338,9 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
|
||||
#ifdef HAVE_PORT_ASSOCIATE
|
||||
V_PORT,
|
||||
#endif // HAVE_PORT_ASSOCIATE
|
||||
#ifdef HAVE_LIBUV
|
||||
V_LIBUV,
|
||||
#endif // HAVE_LIBUV
|
||||
#ifdef HAVE_POLL
|
||||
V_POLL,
|
||||
#endif // HAVE_POLL
|
||||
@ -349,17 +349,19 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
|
||||
OptionHandler* op(new ParameterOptionHandler
|
||||
(PREF_EVENT_POLL,
|
||||
TEXT_EVENT_POLL,
|
||||
#ifdef HAVE_LIBUV
|
||||
V_LIBUV,
|
||||
#elif defined(HAVE_EPOLL)
|
||||
#if defined(HAVE_EPOLL)
|
||||
V_EPOLL,
|
||||
#elif defined(HAVE_KQUEUE)
|
||||
V_KQUEUE,
|
||||
#elif defined(HAVE_PORT_ASSOCIATE)
|
||||
V_PORT,
|
||||
#else
|
||||
#elif defined(HAVE_LIBUV)
|
||||
V_LIBUV,
|
||||
#elif defined(HAVE_POLL)
|
||||
V_POLL,
|
||||
#else // defined(HAVE_EPOLL)
|
||||
V_SELECT,
|
||||
#endif // !HAVE_LIBUV
|
||||
#endif // defined(HAVE_EPOLL)
|
||||
std::vector<std::string>
|
||||
(vbegin(params), vend(params))));
|
||||
op->addTag(TAG_ADVANCED);
|
||||
|
Loading…
Reference in New Issue
Block a user