Is the AsyncCallback framework implemented in such a way that when a RemoteService method is called, is it a GUARANTEE that the browser's event loop will execute at least one cycle before its callback (i.e. onSuccess or onFailure) gets called?
For example: ...some code... myRemoteService.myMethod( myParameter, new AsyncCallback<String>() { public void onSuccess(String result) { .... } }); ...some "long running" code... In the above example, if the result of myMethod happens to return before the "some long running code" finishes, will the browser's event loop always receive at least one cycle before onSuccess() is called? Or is it ever possible that onSuccess() could get called without yielding to the browser's event loop? Another way to ask this question would be: Is there ever a scenario where it is necessary to do the following (or put the scheduleDeferred call inside myMethod's onSuccess callback)? Schedule.get().scheduleDeferred( new ScheduledCommand() { myRemoteService.myMethod( myParameter, new AsyncCallback<String>() { public void onSuccess(String result) { .... } }); }); -Tad -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.