#include "forks.hpp"
#include "workers.hpp"

#include <print>
#include <ranges>
#include <thread>
#include <vector>

int main() {
  const std::size_t num_philosophers = 4;
  const std::size_t rounds = 3;

  th_safe::forks table(num_philosophers);

  std::vector<std::jthread> philosophers;
  for (auto id : std::views::iota(0UL, num_philosophers)) {
    philosophers.emplace_back(workers::philosopher, id, std::ref(table),
                              rounds);
  }
}
