MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / parserBindingForObjectTopic

Method parserBindingForObjectTopic

pj_runtime/src/SessionManager.cpp:592–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592SessionManager::ParserBinding SessionManager::parserBindingForObjectTopic(ObjectTopicId id) const {
593 std::shared_lock lock(object_parsers_mutex_);
594 const auto* slot = findValidParserSlotLocked(id);
595 if (slot == nullptr) {
596 return {};
597 }
598 // Copy the shared_ptrs out under the lock so the snapshot keeps the parser
599 // alive even if the streaming worker replaces the slot right after we release.
600 return ParserBinding{
601 static_cast<MessageParserPluginBase*>(slot->handle->context()),
602 slot->mutex,
603 slot->handle,
604 };
605}
606
607std::shared_ptr<void> SessionManager::parserKeepaliveForObjectTopic(ObjectTopicId id) const {
608 // shared_ptr<MessageParserHandle> -> shared_ptr<void>: holding it keeps the

Callers 15

createMediaSourceMethod · 0.80
createMediaSourceMethod · 0.80
createMediaSourceMethod · 0.80
TESTFunction · 0.80
ingestNewerThanCursorMethod · 0.80
attachMethod · 0.80
bootstrapMethod · 0.80
renderAtMethod · 0.80
attachMethod · 0.80
setSourceTopicMethod · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64