diff options
| author | Nils Maier <maierman@web.de> | 2013-04-10 08:47:20 +0200 |
|---|---|---|
| committer | Nils Maier <maierman@web.de> | 2013-04-10 08:47:20 +0200 |
| commit | 9acd3df3cb833e429687347a0d049306353c6e2a (patch) | |
| tree | 4abcdc54e8bd321ebd1b1e052003c3b34655caeb /src/OptionHandlerFactory.cc | |
| parent | b35fbd3172169bb0f586fa9a708808dc6d8b7ecd (diff) | |
LibUV: Implement LibuvEventPoll
LibUV event will use the best available polling method on a system, kind
of like aria2 does already with the different *EventPoll
implementations.
However, libuv may support different/newer polling mechanisms; for
example on Windows it will use IO Completion Ports which are superior to
select() ;)
Diffstat (limited to 'src/OptionHandlerFactory.cc')
| -rw-r--r-- | src/OptionHandlerFactory.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 835d2388..6715b31a 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -329,6 +329,9 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers() } { std::string params[] = { +#ifdef HAVE_LIBUV + V_LIBUV, +#endif // HAVE_LIBUV #ifdef HAVE_EPOLL V_EPOLL, #endif // HAVE_EPOLL @@ -346,15 +349,17 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new ParameterOptionHandler (PREF_EVENT_POLL, TEXT_EVENT_POLL, -#ifdef HAVE_EPOLL +#ifdef HAVE_LIBUV + V_LIBUV, +#elif defined(HAVE_EPOLL) V_EPOLL, -#elif HAVE_KQUEUE +#elif defined(HAVE_KQUEUE) V_KQUEUE, -#elif HAVE_PORT_ASSOCIATE +#elif defined(HAVE_PORT_ASSOCIATE) V_PORT, #else V_SELECT, -#endif // !HAVE_EPOLL +#endif // !HAVE_LIBUV std::vector<std::string> (vbegin(params), vend(params)))); op->addTag(TAG_ADVANCED); |
