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.first.substr(0, 3) ==
"es_")
103 if (resource.second.second > 1) {
104 sortedResources.insert(
105 std::make_pair(std::make_pair(resource.second.second, resource.first), resource.second.first));
110 for (
auto const&
name : resourceNames) {
114 if (resource->second.second > 1) {
115 sortedResources.insert(
116 std::make_pair(std::make_pair(resource->second.second, resource->first), resource->second.first));
121 std::vector<std::shared_ptr<SerialTaskQueue>> queues;
122 queues.reserve(sortedResources.size());
123 for (
auto const& resource : sortedResources) {
124 queues.push_back(resource.second);
126 if (queues.empty()) {
129 queues.push_back(std::make_shared<SerialTaskQueue>());