shouldBroadcast method

bool shouldBroadcast(
  1. {bool claimExecution = false}

Whether a cache operation has requested a broadcast and it is safe to do.

The caller must claimExectution to clear the broadcastRequested flag.

This is not meant to be called outside of the QueryManager


bool shouldBroadcast({bool claimExecution = false}) {
  if (inflightOptimisticTransactions == 0 && broadcastRequested) {
    if (claimExecution) {
      broadcastRequested = false;
    return true;
  return false;