Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | List of all members
faiss::WorkerThread Class Reference

## Public Member Functions
| ~WorkerThread ()
void | stop ()
| Request that the worker thread stop itself.
void | waitForThreadExit ()
std::future< bool > | add (std::function< void()> f)

## Detailed Description

Definition at line 18 of file WorkerThread.h.

## Constructor & Destructor Documentation

faiss::WorkerThread::~WorkerThread | ( |  | ) |

Stops and waits for the worker thread to exit, flushing all pending lambdas

Definition at line 38 of file WorkerThread.cpp.

## Member Function Documentation

std::future< bool > faiss::WorkerThread::add | ( | std::function< void()> | f | ) |

Adds a lambda to run on the worker thread; returns a future that can be used to block on its completion. Future status is `true` if the lambda was run in the worker thread; `false` if it was not run, because the worker thread is exiting or has exited.

Definition at line 57 of file WorkerThread.cpp.

void faiss::WorkerThread::waitForThreadExit | ( |  | ) |

Blocking waits in the current thread for the worker thread to stop

Definition at line 119 of file WorkerThread.cpp.

The documentation for this class was generated from the following files:

- /data/users/hoss/faiss/WorkerThread.h
- /data/users/hoss/faiss/WorkerThread.cpp