Hi Thomas, Yes, I was running it in Firefox, sorry for not mentioning it before. But I guess I stumbled onto the same bug here too. This puts me at ease now though since I know that there shouldn't be any concurrent execution: the calling method should finish before executing the async callback even if the async returns before the method finishes.
Thanks again Thomas, I think I can safely say on behalf of everyone that you're much appreciated around here. -seth On Thursday, March 14, 2013 10:04:49 AM UTC+1, Thomas Broyer wrote: > > Because the requests are made by the browser, this shouldn't be different > in prod vs. dev mode. > Was it in Firefox? 'cause it has a bug where it could execute scripts > concurrently in some cases: > https://code.google.com/p/google-web-toolkit/issues/detail?id=7926 > > On Thursday, March 14, 2013 3:13:33 AM UTC+1, GWTter wrote: >> >> Hi all, >> >> I have a situation where, although extremely rare and really should only >> arise while debugging, one of my Async calls returns and executes its >> callback before the calling function/main loop is done with its execution. >> This has only been done in Dev mode and not prod. >> >> Now I know (or at least I'm pretty pretty sure) that in JS the async >> callback is pushed onto the event stack to evaluate next when it returns, >> thus it is called only after the calling JS execution returns and would not >> interrupt currently running JS to execute. Even the gwt doc states >> "Although the code inside the onSuccess() method is defined inline with >> the call, it will not be executed until both the calling code returns back >> to the JavaScript main loop, and the result message from the server >> returns." at the end of >> https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideGettingUsedToAsyncCalls. >> >> So my question is "am I seeing this behavior only because it is in Dev >> mode and is actually just because Java is running with threads or is this >> actually possible in Prod too? " >> >> Thanks a lot in advance, >> >> -Seth >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
