Skip to content

Commit e0b8572

Browse files
committed
add barrier for subscribers in FileEngine too (at least to synchronize on closing)
1 parent 05901b4 commit e0b8572

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/FileEngine.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ void FileEngine::end_sub_transaction()
219219
transport->clear_to_read_in_transaction(self);
220220

221221
XBT_DEBUG("All on-flight subscribe activities are completed.");
222+
223+
// This is the end of the first transaction, create a barrier
224+
if (auto sub_barrier = get_subscribers().get_or_create_barrier())
225+
XBT_DEBUG("Barrier created for %zu subscribers", get_subscribers().count());
226+
222227
// Mark this transaction as over
223228
sub_transaction_in_progress_ = false;
224229
}

0 commit comments

Comments
 (0)