Skip to content

review NotificationService #318

@devhawk

Description

@devhawk

AI suggested adding code to notificationListener

// Signal all waiters so they re-check the DB after a reconnect. Any
// notification that fired during the connection outage would have been
// missed; waking waiters lets them poll the DB directly rather than
// sleeping out their full timeout.

for (LockConditionPair pair : notificationsMap.values()) {
  pair.lock.lock();
  try {
    pair.condition.signalAll();
  } finally {
    pair.lock.unlock();
  }
}

but I haven't really taken a deep look at how LockConditionPair works or to see if it can be improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions