Lines Matching refs:future
31 #include <future>
40 /* Simply use the standard future. */
42 using future = std::future<T>;
57 /* A compatibility wrapper for std::future. Once <thread> and
58 <future> are available in all GCC builds -- should that ever happen
65 std::future compatibility methods. The provided methods are chosen
69 class future
73 explicit future (T value)
78 future () = default;
79 future (future &&other) = default;
80 future (const future &other) = delete;
81 future &operator= (future &&other) = default;
82 future &operator= (const future &other) = delete;
103 class future<void>
149 /* Post a task to the thread pool. A future is returned, which can
151 future<void> post_task (std::function<void ()> &&func)
155 future<void> result = task.get_future ();
164 /* Post a task to the thread pool. A future is returned, which can
167 future<T> post_task (std::function<T ()> &&func)
171 future<T> result = task.get_future ();
175 return future<T> (func ());
187 /* Post a task to the thread pool. A future is returned, which can