Skip to content

Commit

Permalink
Make removeSnapshotsInSyncListener run on AQ (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Chen authored May 19, 2020
1 parent 56fc810 commit b1172c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ public void addSnapshotsInSyncListener(EventListener<Void> listener) {
}

public void removeSnapshotsInSyncListener(EventListener<Void> listener) {
// Checks for shutdown but does not raise error, allowing remove after shutdown to be a no-op.
if (isTerminated()) {
return;
}
eventManager.removeSnapshotsInSyncListener(listener);
asyncQueue.enqueueAndForget(() -> eventManager.removeSnapshotsInSyncListener(listener));
}

private void verifyNotTerminated() {
Expand Down

0 comments on commit b1172c9

Please sign in to comment.