mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
24 lines
375 B
C++
24 lines
375 B
C++
#ifndef SHARED_RESOURCE_H
|
|
#define SHARED_RESOURCE_H
|
|
|
|
#include "core/string.h"
|
|
|
|
#include "resource.h"
|
|
#include "core/threading/mutex.h"
|
|
|
|
class SharedResource : public Resource {
|
|
RCPP_OBJECT(SharedResource, Resource);
|
|
|
|
public:
|
|
void lock();
|
|
void unlock();
|
|
|
|
SharedResource();
|
|
~SharedResource();
|
|
|
|
private:
|
|
//todo add read write lock instead of this
|
|
Mutex _mutex;
|
|
};
|
|
|
|
#endif |