Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
floriantschopp committed Mar 22, 2024
1 parent b18c285 commit 3210d0e
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions modules/concurrency/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# README: containers
# Concurrency Module

## Brief
The Concurrency module provides a set of classes and functions to help with multithreaded programming. It includes utilities for managing threads, synchronizing data access, and handling asynchronous tasks.

containers provides .. <one line description>
## Spinner Component

## Detailed description
One of the key components of the Concurrency module is the `Spinner` class. The `Spinner` class provides a simple way to run a task in a separate thread and stop it when necessary.

Provide more details on the functionality, API usage, etc
### Usage

To use the `Spinner` class, you need to create a subclass and implement the `spinOnce` method. This method will be called repeatedly in a separate thread when the spinner is started.
Check the [example](examples/spinner_example.cpp) for more details.

### Stopping the Spinner

The `Spinner` class provides a `stop` method to stop the spinner. You can also add a stop callback that will be called when the spinner is stopped.
Check the [test](tests/spinner_tests.cpp) for more details.

### Thread Safety

The `Spinner` class is thread-safe. You can safely call `start`, `stop`, and `addStopCallback` from multiple threads without additional synchronization.

0 comments on commit 3210d0e

Please sign in to comment.