espp/thread_pool

1.1.7

Latest
uploaded 3 hours ago
Generic thread pool component implemented with espp::Task and condition variables.

Readme

# Thread Pool Component

[![Badge](https://components.espressif.com/components/espp/thread_pool/badge.svg)](https://components.espressif.com/components/espp/thread_pool)

The `ThreadPool` component provides a reusable pool of worker tasks for executing queued jobs asynchronously.

It is implemented with `espp::Task` workers and `std::condition_variable` synchronization.

## Features

- Configurable worker count
- Bounded or unbounded queue
- Optional blocking submit mode for backpressure
- Manual `start()` / `stop()` control; `start()` returns `true` if all workers launched successfully (or the pool was already running), `false` if any worker failed to start and the pool was rolled back to stopped state
- Graceful stop (stops workers; queued jobs may not be executed)
- Thread-safe stats for submitted / executed / rejected jobs

Links

Supports all targets

Maintainer

  • William Emfinger <waemfinger@gmail.com>
To add this component to your project, run:

idf.py add-dependency "espp/thread_pool^1.1.7"

download archive

Stats

  • Archive size
    Archive size ~ 10.10 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

espp/thread_pool version: 1.1.7
|