use of org.rstudio.core.client.events.BarrierReleasedHandler in project rstudio by rstudio.
the class Application method onReloadWithLastChanceSave.
public void onReloadWithLastChanceSave(ReloadWithLastChanceSaveEvent event) {
Barrier barrier = new Barrier();
barrier.addBarrierReleasedHandler(new BarrierReleasedHandler() {
@Override
public void onBarrierReleased(BarrierReleasedEvent event) {
events_.fireEvent(new ReloadEvent());
}
});
Token token = barrier.acquire();
try {
events_.fireEvent(new LastChanceSaveEvent(barrier));
} finally {
token.release();
}
}
Aggregations