Good point, Justin. Note that the "single" concurrency just throws an error if you try to invoke a second call while there is another one in progress for the same RemoteObject.
2012/3/26 Justin Mclean <jus...@classsoftware.com>: > Hi, > >> I feel like a lot of people tried and are trying to address the >> disadvantages of coding async control flows. So I ask myself again: >> with worker threads, wouldn't it be simpler to just ask to synchronize >> the thread on the async token, i.e. locking it until result/fault? > > In general this would work for a string of calls one after the other where > each call depends on the results of the previous call. > > However you may want to make 3 async calls and then when you get all 3 back > (which may return in a different order each time) then make another call if > they all worked. > > In this case I've at various times used different way of solving this by > using event maps, counting no of successful calls before making another, > setting concurrency and made code independent of the order the calls return > in. > > I'm not sure that worker threads can really help with making async calls (but > happy to be convinced otherwise). > > Re locking there is a property on both the web service and remote classes > which would act the same way as locking. Just set concurrency to "single". > > Thanks, > Justin