Files
2021-12-14 00:28:25 -07:00

16 lines
303 B
C++

#pragma once
#include <functional>
namespace ThreadUtils {
class CRethrow {
private:
std::function<void () > m_rethrow;
public:
bool exec( std::function<void () > f ) throw();
void rethrow() const;
bool didFail() const { return !! m_rethrow; }
void clear() { m_rethrow = nullptr; }
};
}