Skip to content
Snippets Groups Projects
Verified Commit 7cb38a56 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#79] Breaking some commandments for MinGW

parent ae3961d7
Loading
Checking pipeline status
#pragma once
#include <functional>
#ifndef __MINGW32__
#include <mutex>
#endif
namespace vkcv {
......@@ -27,7 +30,10 @@ namespace vkcv {
private:
std::vector< event_function<T...> > m_functions;
uint32_t m_id_counter;
#ifndef __MINGW32__
std::mutex m_mutex;
#endif
public:
......@@ -75,14 +81,18 @@ namespace vkcv {
* locks the event so its function handles won't be called
*/
void lock() {
#ifndef __MINGW32__
m_mutex.lock();
#endif
}
/**
* unlocks the event so its function handles can be called after locking
*/
void unlock() {
#ifndef __MINGW32__
m_mutex.unlock();
#endif
}
explicit event(bool locked = false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment