Zth (libzth)
waiter.h File Reference
#include <libzth/allocator.h>
#include <libzth/fiber.h>
#include <libzth/list.h>
#include <libzth/time.h>
#include <libzth/util.h>
#include <type_traits>

Go to the source code of this file.

Classes

class  zth::Waitable
 
class  zth::TimedWaitable
 
class  zth::PolledWaiting< F >
 
struct  zth::PolledMemberWaitingHelper< C >
 
class  zth::PolledMemberWaiting< C >
 
class  zth::Waiter
 A single fiber per Worker that manages sleeping and blocked fibers. More...
 
class  zth::PeriodicWakeUp
 Periodic wakeup after fixed interval. More...
 

Namespaces

 zth
 

Functions

void zth::waitUntil (TimedWaitable &w)
 Wait until the given Waitable has passed. More...
 
template<typename F , typename std::enable_if<!std::is_base_of< TimedWaitable, F >::value, int >::type = 0>
void zth::waitUntil (F f, TimeInterval const &pollInterval=TimeInterval())
 Wait until the given function f returns true. More...
 
template<typename C >
void zth::waitUntil (C &that, bool(C::*f)(), TimeInterval const &pollInterval=TimeInterval())
 Wait until the given member function f returns true. More...
 
void zth::scheduleTask (TimedWaitable &w)
 
void zth::unscheduleTask (TimedWaitable &w)
 
void zth::wakeup (TimedWaitable &w)
 
void zth::nap (Timestamp const &sleepUntil)
 Sleep until the given time stamp. More...
 
void zth::nap (TimeInterval const &sleepFor)
 Sleep for the given time interval. More...
 
void zth::mnap (long sleepFor_ms)
 Sleep for the given amount of milliseconds. More...
 
void zth::unap (long sleepFor_us)
 Sleep for the given amount of microseconds. More...
 
void zth_nap (struct timespec const *ts)
 Sleep for the given time interval. More...
 
void zth_mnap (long sleepFor_ms)
 Sleep for the given amount of milliseconds. More...
 
void zth_unap (long sleepFor_us)
 Sleep for the given amount of microseconds. More...