ProducerOnInitLock.h 429 Bytes
/*
 * ProducerOnInitLock.h
 *
 *  Created on: 15 gru 2018
 *      Author: mariuszo
 */

#ifndef PRODUCERONINITLOCK_H_
#define PRODUCERONINITLOCK_H_

#include <mutex>

class ProducerOnInitLock {
public:
	static std::recursive_mutex lock;
	ProducerOnInitLock(){
	}
	virtual ~ProducerOnInitLock(){}
	static void lockOnInit(){
		lock.lock();
	}
	static void unlockOnInit(){
		lock.unlock();
	}
};

#endif /* PRODUCERONINITLOCK_H_ */