event/Loop: rename Wait() to Poll()
Preparing to have another Wait() method wrapping Poll() and io_uring.
This commit is contained in:
parent
dda85e02bf
commit
aff929dbd6
@ -321,7 +321,7 @@ ExportTimeoutKernelTimespec(Event::Duration timeout, struct __kernel_timespec &b
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
EventLoop::Wait(Event::Duration timeout) noexcept
|
EventLoop::Poll(Event::Duration timeout) noexcept
|
||||||
{
|
{
|
||||||
const auto poll_result =
|
const auto poll_result =
|
||||||
poll_backend.ReadEvents(ExportTimeoutMS(timeout));
|
poll_backend.ReadEvents(ExportTimeoutMS(timeout));
|
||||||
@ -434,11 +434,11 @@ EventLoop::Run() noexcept
|
|||||||
|
|
||||||
if (epoll_ready) {
|
if (epoll_ready) {
|
||||||
/* invoke epoll_wait() */
|
/* invoke epoll_wait() */
|
||||||
epoll_ready = Wait(Event::Duration{0});
|
epoll_ready = Poll(Event::Duration{0});
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
Wait(timeout);
|
Poll(timeout);
|
||||||
|
|
||||||
idle.splice(std::next(idle.begin()), next);
|
idle.splice(std::next(idle.begin()), next);
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @return true if one or more sockets have become ready
|
* @return true if one or more sockets have become ready
|
||||||
*/
|
*/
|
||||||
bool Wait(Event::Duration timeout) noexcept;
|
bool Poll(Event::Duration timeout) noexcept;
|
||||||
|
|
||||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||||
void OnSocketReady(unsigned flags) noexcept;
|
void OnSocketReady(unsigned flags) noexcept;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user