Thread-safe wrapper for managing SearchStatusCode state.
More...
#include <EngineConnection.h>
|
| void | set (SearchStatusCode code) |
| | Set the search status to the specified code.
|
| |
| SearchStatusCode | swapIfOngoing (SearchStatusCode newStatus) |
| | Atomically swap status if current status is OnGoing.
|
| |
| SearchStatusCode | get () |
| | Get the current search status.
|
| |
| SearchStatusCode | waitFor (const std::chrono::milliseconds &dur) |
| | Block until the search status changes or timeout expires.
|
| |
| const SearchStatusCode & | operator= (const SearchStatusCode &value) |
| | Assignment operator for convenient status setting.
|
| |
|
bool | operator== (const SearchStatusCode &value) |
| |
|
bool | operator!= (const SearchStatusCode &value) |
| |
Thread-safe wrapper for managing SearchStatusCode state.
Provides synchronized access to the search status with atomic-like operations. Supports blocking waits, condition variables, and compare-swap semantics for safe concurrent access. Used internally by SearchConnection to manage search state across multiple threads.
◆ get()
| SearchStatusCode UCILoader::SearchStatusWrapper::get |
( |
| ) |
|
|
inline |
Get the current search status.
- Returns
- The current SearchStatusCode
◆ operator=()
| const SearchStatusCode & UCILoader::SearchStatusWrapper::operator= |
( |
const SearchStatusCode & |
value | ) |
|
|
inline |
Assignment operator for convenient status setting.
- Parameters
-
| value | The new status value |
- Returns
- Reference to the assigned value
◆ set()
| void UCILoader::SearchStatusWrapper::set |
( |
SearchStatusCode |
code | ) |
|
|
inline |
Set the search status to the specified code.
- Parameters
-
| code | The new SearchStatusCode value |
◆ swapIfOngoing()
| SearchStatusCode UCILoader::SearchStatusWrapper::swapIfOngoing |
( |
SearchStatusCode |
newStatus | ) |
|
|
inline |
Atomically swap status if current status is OnGoing.
This is a compare-and-swap operation that only changes the status if it's currently OnGoing. Useful for implementing asynchronous timeouts and preventing race conditions.
- Parameters
-
| newStatus | The status to set if current status is OnGoing |
- Returns
- The status value before this operation
◆ waitFor()
| SearchStatusCode UCILoader::SearchStatusWrapper::waitFor |
( |
const std::chrono::milliseconds & |
dur | ) |
|
|
inline |
Block until the search status changes or timeout expires.
If the status remains OnGoing after the timeout period, automatically sets status to TimedOut.
- Parameters
-
| dur | Maximum duration to wait in milliseconds |
- Returns
- The final SearchStatusCode (may be TimedOut if no change occurred)
The documentation for this class was generated from the following file: