| 613 | } |
| 614 | |
| 615 | MessageParserPluginBase* SessionManager::parserForObjectTopic(ObjectTopicId id) const { |
| 616 | // Returns a RAW pointer with no keepalive: only safe for synchronous GUI-thread |
| 617 | // use that does not outlive the call. Cross-thread / cached consumers must take |
| 618 | // parserBindingForObjectTopic and hold its keepalive instead. |
| 619 | std::shared_lock lock(object_parsers_mutex_); |
| 620 | const auto* slot = findValidParserSlotLocked(id); |
| 621 | return slot != nullptr ? static_cast<MessageParserPluginBase*>(slot->handle->context()) : nullptr; |
| 622 | } |
| 623 | |
| 624 | std::shared_ptr<std::mutex> SessionManager::parserMutexForObjectTopic(ObjectTopicId id) const { |
| 625 | std::shared_lock lock(object_parsers_mutex_); |
no outgoing calls
no test coverage detected