36 for (
const auto&
action : actions)
41 template<
class collection_t>
42 static auto invoke(
const collection_t& actions) ->
void {
44 for (
const auto&
action : actions)
49 template<
typename ...args_t>
53 static auto invoke(
const xtd::array<std::function<
void()>>& actions) ->
void {
54 xtd::collections::generic::list<xtd::threading::tasks::task<>> tasks;
55 for (
const auto&
action : actions)
56 tasks.
add(xtd::threading::tasks::task<>::factory().start_new(
action));
57 task<>::wait_all(tasks);
Contains xtd::array class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
auto add(const type_t &item) -> void override
Adds an object to the end of the xtd::collections::generic::list <type_t>.
Definition list.hpp:273
Provides support for creating and scheduling Task objects.
Definition parallel.hpp:22
static auto invoke(const xtd::array< xtd::action<> > &actions) -> void
Executes each of the provided actions, possibly in parallel.
Definition parallel.hpp:34
Represents an asynchronous operation.
Definition task_result.hpp:20
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
delegate< void(arguments_t...)> action
Represents a xtd::delegate that has variable parameters and does not return a value.
Definition action.hpp:20
Contains xtd::collections::generic::list <type_t> class.
The xtd::threading::tasks namespace provides types that simplify the work of writing concurrent and a...
Definition itask.hpp:14
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::static_object class.
Contains xtd::threading::tasks::task_factory <result_t> class.