Question about RPC calls

2009-11-17 Thread Zenon
Hello, I was wandering how to find out when 2 RP calls finish in order to execute some code. An example: rpc_funct_A(); rpc_funct_B(); // some code to execute only when both functions get to an end. As you know, *some code* could probably begin before rpc_funct ends their execution and I

Re: Question about RPC calls

2009-11-17 Thread olivier nouguier
Hi, Basically: rpc_funct_A(){ onSuccess(){ rpc_funct_B(){ onSuccess(){ // some code to execute only when both functions get to an end. } } } } A look at MVP + Event Driven should give you some nice design/pattern. On Tue, Nov 17, 2009 at 3:04 PM, Zenon zeno...@gmail.com wrote:

Re: Question about RPC calls

2009-11-17 Thread Ian Bambury
The problem with that is that you have to wait for call A to return before initiating call B. What if you have 5 or 6 calls. Or the user can submit different bits as and when? The best way is to make a single rpc call which does everything you want out of A and B when everything is ready. If

Re: Question about RPC calls

2009-11-17 Thread Zenon
Lol! I just have thought of using flags, but not to call check() for every function... Thanks! 2009/11/17 Ian Bambury ianbamb...@gmail.com: The problem with that is that you have to wait for call A to return before initiating call B. What if you have 5 or 6 calls. Or the user can submit

Re: Question about RPC calls

2009-11-17 Thread Zenon
LoL! I already thought about using flags, but not to call check() for every function... Thank you man! On 17 Nov, 16:56, Ian Bambury ianbamb...@gmail.com wrote: The problem with that is that you have to wait for call A to return before initiating call B. What if you have 5 or 6 calls. Or the

Re: Question about RPC calls

2009-11-17 Thread Eric
On Nov 17, 10:56 am, Ian Bambury ianbamb...@gmail.com wrote: The problem with that is that you have to wait for call A to return before initiating call B. What if you have 5 or 6 calls. Or the user can submit different bits as and when? The best way is to make a single rpc call which does

Re: Question about RPC calls

2009-11-17 Thread Ian Bambury
Mmm. I'd prefer to be sure that I have each rpc call complete successfully the last time it ran rather than open up the possibility that one of them completed successfully 3 times and the other two either failed an indeterminate number of times or didn't get called at all. Depends on the