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.
26 lines
381 B
26 lines
381 B
#include "resources.hpp"
|
|
|
|
Resources::Resources() :
|
|
pLock(new ResourceLock())
|
|
{
|
|
std::cout << "Ctor resources" << std::endl;
|
|
}
|
|
|
|
Resources::~Resources()
|
|
{
|
|
|
|
}
|
|
|
|
void Resources::print(const int& number)
|
|
{
|
|
// threadsafe usage of resources
|
|
|
|
pLock->lock();
|
|
|
|
std::cout << "resources in use" << std::endl;
|
|
std::cout << "printing number: " << number << std::endl;
|
|
|
|
pLock->unlock();
|
|
}
|
|
|