Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Framework/Core/include/Framework/MessageContext.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -466,6 +466,11 @@ class MessageContext
/// discarded.
voidclear();

/// Discard pending output messages without asserting that they were sent. This
/// is intended for exception teardown paths where normal post-processing will
/// not run.
voiddiscard();

FairMQDeviceProxy& proxy()
{
returnmProxy;
Expand Down
7 changes: 7 additions & 0 deletions Framework/Core/src/MessageContext.cxx
Original file line numberDiff line numberDiff line change
Expand Up@@ -107,6 +107,13 @@ void MessageContext::clear()
mMessages.clear();
}

void MessageContext::discard()
{
mDidDispatch = false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will result in noisy comments about which tables were not created. I guess that's the indended behavior?

mScheduledMessages.clear();
mMessages.clear();
}

int64_t MessageContext::addToCache(std::unique_ptr<fair::mq::Message>& toCache)
{
auto&& cached = toCache->GetTransport()->CreateMessage();
Expand Down