Seastar
High performance C++ framework for concurrent servers
Classes | Namespaces | Typedefs | Functions
future-util.hh File Reference
#include <seastar/core/task.hh>
#include <seastar/core/future.hh>
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/do_with.hh>
#include <seastar/core/timer.hh>
#include <seastar/util/bool_class.hh>
#include <tuple>
#include <iterator>
#include <vector>
#include <seastar/util/std-compat.hh>
#include <seastar/util/tuple_utils.hh>
#include <seastar/util/noncopyable_function.hh>

Go to the source code of this file.

Classes

struct  seastar::stop_iteration_tag
 
struct  seastar::repeat_until_value_type_helper< future< compat::optional< T > > >
 Type helper for repeat_until_value() More...
 
struct  seastar::reducer_with_get_traits< T, IsFuture >
 
struct  seastar::reducer_with_get_traits< T, false >
 
struct  seastar::reducer_with_get_traits< T, true >
 
struct  seastar::reducer_traits< T, V >
 
struct  seastar::reducer_traits< T, decltype(std::declval< T >().get(), void())>
 
class  seastar::adder< Result, Addend >
 
class  seastar::timed_out_error
 
struct  seastar::default_timeout_exception_factory
 

Namespaces

 seastar
 Seastar API namespace.
 

Typedefs

using seastar::stop_iteration = bool_class< stop_iteration_tag >
 
template<typename AsyncAction >
using seastar::repeat_until_value_return_type = typename repeat_until_value_type_helper< std::result_of_t< AsyncAction()> >::future_type
 Return value of repeat_until_value()
 

Functions

template<typename Func , typename... Args>
auto seastar::with_scheduling_group (scheduling_group sg, Func func, Args &&... args)
 run a callable (with some arbitrary arguments) in a scheduling group More...
 
template<typename Iterator , typename Func >
future seastar::parallel_for_each (Iterator begin, Iterator end, Func &&func)
 
template<typename Range , typename Func >
future seastar::parallel_for_each (Range &&range, Func &&func)
 
template<typename AsyncAction >
future seastar::repeat (AsyncAction action)
 
template<typename AsyncAction >
repeat_until_value_return_type< AsyncAction > seastar::repeat_until_value (AsyncAction action)
 
template<typename AsyncAction , typename StopCondition >
future seastar::do_until (StopCondition stop_cond, AsyncAction action)
 
template<typename AsyncAction >
future seastar::keep_doing (AsyncAction action)
 
template<typename Iterator , typename AsyncAction >
future seastar::do_for_each (Iterator begin, Iterator end, AsyncAction action)
 
template<typename Container , typename AsyncAction >
future seastar::do_for_each (Container &c, AsyncAction action)
 
template<typename Fut , std::enable_if_t< is_future< Fut >::value, int > = 0>
auto seastar::futurize_apply_if_func (Fut &&fut)
 
template<typename Func , std::enable_if_t<!is_future< Func >::value, int > = 0>
auto seastar::futurize_apply_if_func (Func &&func)
 
template<typename... Futs>
future< std::tuple< Futs... > > seastar::when_all_impl (Futs &&... futs)
 
template<typename... FutOrFuncs>
auto seastar::when_all (FutOrFuncs &&... fut_or_funcs)
 
template<typename FutureIterator >
future< std::vector< typename std::iterator_traits< FutureIterator >::value_type > > seastar::when_all (FutureIterator begin, FutureIterator end)
 
template<typename Iterator , typename Mapper , typename Reducer >
auto seastar::map_reduce (Iterator begin, Iterator end, Mapper &&mapper, Reducer &&r) -> typename reducer_traits< Reducer >::future_type
 
template<typename Iterator , typename Mapper , typename Initial , typename Reduce >
future< Initial > seastar::map_reduce (Iterator begin, Iterator end, Mapper &&mapper, Initial initial, Reduce reduce)
 
template<typename Range , typename Mapper , typename Initial , typename Reduce >
future< Initial > seastar::map_reduce (Range &&range, Mapper &&mapper, Initial initial, Reduce reduce)
 
future seastar::now ()
 
future seastar::later ()
 
template<typename ExceptionFactory = default_timeout_exception_factory, typename Clock , typename Duration , typename... T>
future< T... > seastar::with_timeout (std::chrono::time_point< Clock, Duration > timeout, future< T... > f)
 Wait for either a future, or a timeout, whichever comes first. More...
 
template<typename... Futures>
auto seastar::when_all_succeed_impl (Futures &&... futures)
 
template<typename... FutOrFuncs>
auto seastar::when_all_succeed (FutOrFuncs &&... fut_or_funcs)
 
template<typename FutureIterator , typename = typename std::iterator_traits<FutureIterator>::value_type>
auto seastar::when_all_succeed (FutureIterator begin, FutureIterator end)