You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
552 B
25 lines
552 B
#ifndef FS_MUTEX
|
|
#define FS_MUTEX
|
|
|
|
#include <iostream>
|
|
|
|
namespace pEp {
|
|
namespace PityTest11 {
|
|
// a very primitive IPC sync method
|
|
// also unreliable
|
|
// but good enough for what i just needed it for
|
|
class fs_mutex {
|
|
public:
|
|
fs_mutex() = delete;
|
|
fs_mutex(std::string mutexpath);
|
|
|
|
void aquire() const;
|
|
void release() const;
|
|
|
|
private:
|
|
const std::string mutexpath;
|
|
};
|
|
} // namespace PityTest11
|
|
} // namespace pEp
|
|
|
|
#endif // FS_MUTEX
|