gtsam
Loading...
Searching...
No Matches
TaskScheduler.h File Reference

Cooperative task scheduler. More...

Go to the source code of this file.

Classes

struct  gtsam::detail::TaskSchedulerPolicy
 Queue policy for TaskScheduler: deque with local LIFO and stolen FIFO. More...

Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.

Typedefs

template<typename Y>
using gtsam::TaskScheduler = Scheduler<Y, detail::TaskSchedulerPolicy>
 Thread pool scheduler that executes tasks without priority ordering.

Detailed Description

Cooperative task scheduler.

This header defines a small, thread-based scheduler that executes tasks in a cooperative manner without priority ordering. Tasks return a value of type Y, and callers can wait on results via std::future<Y>.

This is implemented as a policy specialization of gtsam::Scheduler.

Example
auto future = scheduler.schedule([] { return 42; });
int value = future.get();
Scheduler< Y, detail::TaskSchedulerPolicy > TaskScheduler
Thread pool scheduler that executes tasks without priority ordering.
Definition TaskScheduler.h:82
Author
Frank Dellaert
Date
May, 2025