text: #ifndef SIILI__KZ__ASYNC_EXECUTOR_HPP
  #define SIILI__KZ__ASYNC_EXECUTOR_HPP
  
  #include <functional>
  #include <kanzi/core.ui/domain/domain.hpp>
  
  
  namespace siili
  {
  namespace kz
  {
  
  /// Create async tasks executor that submits each task directly to Kanzi's TaskDispatcher.
  std::function<void(std::function<void()>)> makeAsyncExecutor(kanzi::Domain *domain);
  
  
  /// Create decorator for async tasks executor that groups all pending tasks and invokes them together.
  ///
  /// The decorator ensures that all pending tasks submitted to it will be executed as a group (in the
  /// original order) via the base executor, i.e. no other tasks submitted to the base executor will
  /// be executed in between.
  std::function<void(std::function<void()>)> makeGroupingAsyncExecutor(
      std::function<void(std::function<void()>)> baseAsyncExecutor);
  
  }
  }
  
  #include <siili/kz/async_executor_impl.hpp>
  
  #endif
  