latest SDK
This commit is contained in:
15
foobar2000/helpers/rethrow.h
Normal file
15
foobar2000/helpers/rethrow.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#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; }
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user