New Posts New Posts RSS Feed: Coroutines
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Coroutines

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Coroutines
    Posted: 31-Oct-2013 at 9:29am
I am using DevForce 2010 on .net 4.0 and Intersoft ClientUI controls. I want to display a busy indicator on the form while a remote server method is running. In the remote server method i am using synchronous calls. I need to change these to asynchronous calls because i need to yield control back to the UI to display the busy indicator. But the method on the server is made up of multiple calls that have to be executed in sequence. Can i use a coroutine on the server and have it yield control back to the client for displaying my busy indicator or does the coroutine have to run on the client side without any remote server calls?

Bill

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 31-Oct-2013 at 3:50pm
You definitely can't yield control from the server back to the client. 
 
If you need a progress indicator, then I suppose a Coroutine on the client which makes async calls to the server - the same calls you were doing synchronously within the RPC method - may work.
Back to Top
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Posted: 31-Oct-2013 at 5:44pm
can one class yield control back to another. For example i  have a class called MemberEditViewModel. It has a method called CalculateBalanceOwing. It sets the IsBusy property to true and then calls the MemberServices class which has a method called CalculateBalanceOwing which is a coroutine. Can the method in MemberServices yield control back to the ViewModel class? So the call to the coroutine is in one class and the coroutine itself is in another class. Both are on the same client layer.

Bill
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 31-Oct-2013 at 6:03pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down