// Headers are available because we added the pls target
const long NUM_THREADS = 8;
const long MEMORY_PER_THREAD = 2u << 12u;

#include "pls/pls.h"

pls::static_scheduler_memory<NUM_THREADS, MEMORY_PER_THREAD> memory;

int main() {
  pls::scheduler scheduler{&memory, NUM_THREADS};

  scheduler.perform_work([]() {
    auto lambda = []() {
      // Do work
    };
    using lambda_task = pls::lambda_task_by_value<decltype(lambda)>;

    pls::scheduler::spawn_child<lambda_task>(lambda);
    pls::scheduler::spawn_child<lambda_task>(lambda);

    pls::scheduler::wait_for_all();
  });

  scheduler.terminate();
  return 0;
}
