Added support for thread cancellation on Linux

This commit is contained in:
Benoit Steiner
2016-12-08 08:12:49 -08:00
parent 6811e6cf49
commit 7bfff85355
6 changed files with 58 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ struct StlThreadEnvironment {
public:
EnvThread(std::function<void()> f) : thr_(std::move(f)) {}
~EnvThread() { thr_.join(); }
void Cancel() { EIGEN_THREAD_CANCEL(thr_); }
private:
std::thread thr_;