-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b18c285
commit 3210d0e
Showing
1 changed file
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |