java - does asynchronous call in GWT get blocked due to another asynchronous call which taking long time to finish -
i have following codes executed every 3 seconds asynchronously
<scheduler.get().schedulefixeddelay(new repeatingcommand() { @override public boolean execute() { try { requestbuilder builder = new requestbuilder(requestbuilder.post, "someurl"); request response = builder.sendrequest(null, new requestcallback() { public void onerror(request request, throwable exception) { } public void onresponsereceived(request request, response response) { // work } }); } catch (requestexception e) {} return true; } }, 3000);
and below code takes long time proceed.
try { requestbuilder builder = new requestbuilder(requestbuilder.post, "someurl"); request response = builder.sendrequest(null, new requestcallback() { public void onerror(request request, throwable exception) { } public void onresponsereceived(request request, response response) { // work takes long time finish } }); } catch (requestexception e) {}
i expecting scheduler make call in every 3 seconds, when other call takes more time finish call inside scheduler gets blocked supposed not asynchronous call.
please let me know if wrong in above scenario.
onresponsereceived
executed in ui thread. since there 1 ui thread, events executed queued , not overlap.
Comments
Post a Comment