Lely core libraries  2.3.4
lely::ev::Loop Class Reference

A polling event loop. More...

#include <loop.hpp>

Public Member Functions

 Loop (ev_poll_t *poll=nullptr, ::std::size_t npoll=1, bool poll_task=false)
 
 ~Loop ()
 
Poll get_poll () const noexcept
 
Executor get_executor () const noexcept
 
void stop () noexcept
 
bool stopped () const noexcept
 @ see ev_loop_stopped()
 
void restart () noexcept
 
::std::size_t wait (ev_future_t *future)
 
::std::size_t wait (ev_future_t *future, ::std::error_code &ec) noexcept
 
template<class Rep , class Period >
::std::size_t wait_for (ev_future_t *future, const ::std::chrono::duration< Rep, Period > &d)
 
template<class Rep , class Period >
::std::size_t wait_for (ev_future_t *future, const ::std::chrono::duration< Rep, Period > &d, ::std::error_code &ec) noexcept
 
template<class Clock , class Duration >
::std::size_t wait_until (ev_future_t *future, const ::std::chrono::time_point< Clock, Duration > &t)
 
template<class Clock , class Duration >
::std::size_t wait_until (ev_future_t *future, const ::std::chrono::time_point< Clock, Duration > &t, ::std::error_code &ec) noexcept
 
::std::size_t wait_one (ev_future_t *future)
 
::std::size_t wait_one (ev_future_t *future, ::std::error_code &ec) noexcept
 
template<class Rep , class Period >
::std::size_t wait_one_for (ev_future_t *future, const ::std::chrono::duration< Rep, Period > &d)
 
template<class Rep , class Period >
::std::size_t wait_one_for (ev_future_t *future, const ::std::chrono::duration< Rep, Period > &d, ::std::error_code &ec) noexcept
 
template<class Clock , class Duration >
::std::size_t wait_one_until (ev_future_t *future, const ::std::chrono::time_point< Clock, Duration > &t)
 
template<class Clock , class Duration >
::std::size_t wait_one_until (ev_future_t *future, const ::std::chrono::time_point< Clock, Duration > &t, ::std::error_code &ec) noexcept
 
::std::size_t run ()
 
::std::size_t run (::std::error_code &ec) noexcept
 
template<class Rep , class Period >
::std::size_t run_for (const ::std::chrono::duration< Rep, Period > &d)
 
template<class Rep , class Period >
::std::size_t run_for (const ::std::chrono::duration< Rep, Period > &d, ::std::error_code &ec) noexcept
 
template<class Clock , class Duration >
::std::size_t run_until (const ::std::chrono::time_point< Clock, Duration > &t)
 
template<class Clock , class Duration >
::std::size_t run_until (const ::std::chrono::time_point< Clock, Duration > &t, ::std::error_code &ec) noexcept
 
::std::size_t run_one ()
 
::std::size_t run_one (::std::error_code &ec) noexcept
 
template<class Rep , class Period >
::std::size_t run_one_for (const ::std::chrono::duration< Rep, Period > &d)
 
template<class Rep , class Period >
::std::size_t run_one_for (const ::std::chrono::duration< Rep, Period > &d, ::std::error_code &ec) noexcept
 
template<class Clock , class Duration >
::std::size_t run_one_until (const ::std::chrono::time_point< Clock, Duration > &t)
 
template<class Clock , class Duration >
::std::size_t run_one_until (const ::std::chrono::time_point< Clock, Duration > &t, ::std::error_code &ec) noexcept
 
::std::size_t poll ()
 
::std::size_t poll (::std::error_code &ec) noexcept
 
::std::size_t poll_one ()
 
::std::size_t poll_one (::std::error_code &ec) noexcept
 
void kill (void *thr)
 

Static Public Member Functions

static void * self () noexcept
 

Detailed Description

A polling event loop.

Definition at line 41 of file loop.hpp.

Constructor & Destructor Documentation

◆ Loop()

lely::ev::Loop::Loop ( ev_poll_t poll = nullptr,
::std::size_t  npoll = 1,
bool  poll_task = false 
)
inline
See also
ev_loop_create()

Definition at line 47 of file loop.hpp.

◆ ~Loop()

lely::ev::Loop::~Loop ( )
inline
See also
ev_loop_destroy()

Definition at line 68 of file loop.hpp.

Member Function Documentation

◆ get_poll()

Poll lely::ev::Loop::get_poll ( ) const
inlinenoexcept
See also
ev_loop_get_poll()

Definition at line 74 of file loop.hpp.

◆ get_executor()

Executor lely::ev::Loop::get_executor ( ) const
inlinenoexcept
See also
ev_loop_get_exec()

Definition at line 80 of file loop.hpp.

◆ stop()

void lely::ev::Loop::stop ( )
inlinenoexcept
See also
ev_loop_stop()

Definition at line 86 of file loop.hpp.

◆ restart()

void lely::ev::Loop::restart ( )
inlinenoexcept
See also
ev_loop_stop()

Definition at line 98 of file loop.hpp.

◆ wait() [1/2]

::std::size_t lely::ev::Loop::wait ( ev_future_t future)
inline
See also
ev_loop_wait()

Definition at line 104 of file loop.hpp.

◆ wait() [2/2]

::std::size_t lely::ev::Loop::wait ( ev_future_t future,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait()

Definition at line 113 of file loop.hpp.

◆ wait_for() [1/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::wait_for ( ev_future_t future,
const ::std::chrono::duration< Rep, Period > &  d 
)
inline
See also
ev_loop_wait_until()

Definition at line 125 of file loop.hpp.

◆ wait_for() [2/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::wait_for ( ev_future_t future,
const ::std::chrono::duration< Rep, Period > &  d,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait_until()

Definition at line 132 of file loop.hpp.

◆ wait_until() [1/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::wait_until ( ev_future_t future,
const ::std::chrono::time_point< Clock, Duration > &  t 
)
inline
See also
ev_loop_wait_until()

Definition at line 140 of file loop.hpp.

◆ wait_until() [2/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::wait_until ( ev_future_t future,
const ::std::chrono::time_point< Clock, Duration > &  t,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait_until()

Definition at line 150 of file loop.hpp.

◆ wait_one() [1/2]

::std::size_t lely::ev::Loop::wait_one ( ev_future_t future)
inline
See also
ev_loop_wait_one()

Definition at line 160 of file loop.hpp.

◆ wait_one() [2/2]

::std::size_t lely::ev::Loop::wait_one ( ev_future_t future,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait_one()

Definition at line 169 of file loop.hpp.

◆ wait_one_for() [1/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::wait_one_for ( ev_future_t future,
const ::std::chrono::duration< Rep, Period > &  d 
)
inline
See also
ev_loop_wait_one_until()

Definition at line 181 of file loop.hpp.

◆ wait_one_for() [2/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::wait_one_for ( ev_future_t future,
const ::std::chrono::duration< Rep, Period > &  d,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait_one_until()

Definition at line 189 of file loop.hpp.

◆ wait_one_until() [1/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::wait_one_until ( ev_future_t future,
const ::std::chrono::time_point< Clock, Duration > &  t 
)
inline
See also
ev_loop_wait_one_until()

Definition at line 198 of file loop.hpp.

◆ wait_one_until() [2/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::wait_one_until ( ev_future_t future,
const ::std::chrono::time_point< Clock, Duration > &  t,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_wait_one_until()

Definition at line 208 of file loop.hpp.

◆ run() [1/2]

::std::size_t lely::ev::Loop::run ( )
inline
See also
ev_loop_run()

Definition at line 218 of file loop.hpp.

◆ run() [2/2]

::std::size_t lely::ev::Loop::run ( ::std::error_code &  ec)
inlinenoexcept
See also
ev_loop_run()

Definition at line 227 of file loop.hpp.

◆ run_for() [1/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::run_for ( const ::std::chrono::duration< Rep, Period > &  d)
inline
See also
ev_loop_run_until()

Definition at line 239 of file loop.hpp.

◆ run_for() [2/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::run_for ( const ::std::chrono::duration< Rep, Period > &  d,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_run_until()

Definition at line 246 of file loop.hpp.

◆ run_until() [1/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::run_until ( const ::std::chrono::time_point< Clock, Duration > &  t)
inline
See also
ev_loop_run_until()

Definition at line 254 of file loop.hpp.

◆ run_until() [2/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::run_until ( const ::std::chrono::time_point< Clock, Duration > &  t,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_run_until()

Definition at line 263 of file loop.hpp.

◆ run_one() [1/2]

::std::size_t lely::ev::Loop::run_one ( )
inline
See also
ev_loop_run_one()

Definition at line 272 of file loop.hpp.

◆ run_one() [2/2]

::std::size_t lely::ev::Loop::run_one ( ::std::error_code &  ec)
inlinenoexcept
See also
ev_loop_run_one()

Definition at line 281 of file loop.hpp.

◆ run_one_for() [1/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::run_one_for ( const ::std::chrono::duration< Rep, Period > &  d)
inline
See also
ev_loop_run_one_until()

Definition at line 293 of file loop.hpp.

◆ run_one_for() [2/2]

template<class Rep , class Period >
::std::size_t lely::ev::Loop::run_one_for ( const ::std::chrono::duration< Rep, Period > &  d,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_run_one_until()

Definition at line 300 of file loop.hpp.

◆ run_one_until() [1/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::run_one_until ( const ::std::chrono::time_point< Clock, Duration > &  t)
inline
See also
ev_loop_run_one_until()

Definition at line 308 of file loop.hpp.

◆ run_one_until() [2/2]

template<class Clock , class Duration >
::std::size_t lely::ev::Loop::run_one_until ( const ::std::chrono::time_point< Clock, Duration > &  t,
::std::error_code &  ec 
)
inlinenoexcept
See also
ev_loop_run_one_until()

Definition at line 317 of file loop.hpp.

◆ poll() [1/2]

::std::size_t lely::ev::Loop::poll ( )
inline
See also
ev_loop_run_until()

Definition at line 326 of file loop.hpp.

◆ poll() [2/2]

::std::size_t lely::ev::Loop::poll ( ::std::error_code &  ec)
inlinenoexcept
See also
ev_loop_run_until()

Definition at line 335 of file loop.hpp.

◆ poll_one() [1/2]

::std::size_t lely::ev::Loop::poll_one ( )
inline
See also
ev_loop_run_one_until()

Definition at line 346 of file loop.hpp.

◆ poll_one() [2/2]

::std::size_t lely::ev::Loop::poll_one ( ::std::error_code &  ec)
inlinenoexcept
See also
ev_loop_run_one_until()

Definition at line 355 of file loop.hpp.

◆ self()

static void* lely::ev::Loop::self ( )
inlinestaticnoexcept
See also
ev_loop_self()

Definition at line 366 of file loop.hpp.

◆ kill()

void lely::ev::Loop::kill ( void *  thr)
inline
See also
ev_loop_kill()

Definition at line 372 of file loop.hpp.


The documentation for this class was generated from the following file: