38 if (!resource.second.first) {
39 resource.second.first = std::make_shared<SerialTaskQueue>();
41 ++resource.second.second;
45 ++queueAndCounter.second;
49 if (queueAndCounter.second == 1) {
51 queueAndCounter.first = std::make_shared<SerialTaskQueue>();
57 }
else if (queueAndCounter.second == 2) {
58 queueAndCounter.first = std::make_shared<SerialTaskQueue>();
63 std::pair<SharedResourcesAcquirer, std::shared_ptr<std::recursive_mutex>>
67 std::make_shared<std::recursive_mutex>();
89 std::map<std::pair<unsigned int, std::string>, std::shared_ptr<SerialTaskQueue>> sortedResources;
100 if (resource.second.second > 1) {
101 sortedResources.insert(
102 std::make_pair(std::make_pair(resource.second.second, resource.first), resource.second.first));
107 for (
auto const&
name : resourceNames) {
111 if (resource->second.second > 1) {
112 sortedResources.insert(
113 std::make_pair(std::make_pair(resource->second.second, resource->first), resource->second.first));
118 std::vector<std::shared_ptr<SerialTaskQueue>> queues;
119 queues.reserve(sortedResources.size());
120 for (
auto const& resource : sortedResources) {
121 queues.push_back(resource.second);
123 if (queues.empty()) {
126 queues.push_back(std::make_shared<SerialTaskQueue>());