Sunday, May 3, 2015

Re: Synchronized code after a service call



On Sunday, May 3, 2015 at 12:14:08 AM UTC+2, Alireza Rezaei Mahdiraji wrote:

Hi Jens,

Thanks for extensive answers, there are several things for me to learn.

My application is a bit different, I am not loading data from db, rather I have a list of db which
I want to check db connection, and the service will return a pair <db,bool> per each database.

I want to show the user how this process is progressing and user sees which db has been already tested, that
is why I want to call service per db.

With this explanation, how do I solve my problem?

You need some kind of "count down latch": in each AsyncCallback, decrement the counter, and when it reaches zero then run your "finalization" code.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment