Print Page | Close Window

Coroutines

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4586
Printed Date: 12-May-2026 at 8:28pm


Topic: Coroutines
Posted By: BillG
Subject: Coroutines
Date 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




Replies:
Posted By: kimj
Date 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.


Posted By: BillG
Date 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


Posted By: kimj
Date Posted: 31-Oct-2013 at 6:03pm
Here's some info on Coroutines - http://drc.ideablade.com/xwiki/bin/view/Documentation/serial-coroutine-flow - http://drc.ideablade.com/xwiki/bin/view/Documentation/serial-coroutine-flow .



Print Page | Close Window