public void onRpcBegin(final RpcBeginEvent event) {
++concurrentRpcs;
toggleIndicatorVisibility();
}
});
eventBus.addHandler(RpcEndEvent.TYPE, new RpcEndEventHandler() {
@Override
public void onRpcEnd(final RpcEndEvent event) {
--concurrentRpcs;
if (concurrentRpcs < 0) {
//current workaround for race condition