<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Coroutine methods and UserState</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Coroutine methods and UserState</description>
  <pubDate>Mon, 13 Apr 2026 05:51:08 -700</pubDate>
  <lastBuildDate>Thu, 28 Oct 2010 11:06:50 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2272</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Coroutine methods and UserState : In some ways UserState is a legacy...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2272&amp;PID=8960#8960</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2272<br /><strong>Posted:</strong> 28-Oct-2010 at 11:06am<br /><br /><DIV>In some ways UserState is a legacy of our older async API when async operations did not return a xxOperation (EntityQueryOperation, EntitySaveOperation, etc).&nbsp; The UserState is used internally to track every async operation uniquely, and can also be used to cancel an async operation.&nbsp; I guess we tend to forget the fact that it can be used to pass user-defined information between the calling method and the callback.</DIV><DIV>&nbsp;</DIV><DIV>In the case of the Coroutine Start methods, because the Coroutine is not itself asynchronous DevForce does not need a UserState.&nbsp; A UserState is assigned to the CoroutineOperation, but only because that class is a sub-type of the BaseOperation and a UserState is automatically assigned.&nbsp;&nbsp; Because the UserState isn't used by DevForce in the Coroutine, we didn't provide a means of providing it.&nbsp; You can pass parameters into the iterator block via the Start methods, however, and this does in some way give you the same functionality as a user-defined UserState.</DIV><DIV>&nbsp;</DIV><DIV>We can certainly look at adding a UserState parameter to the Start methods and have opened a feature request for this.&nbsp; Thanks for the feedback.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 28 Oct 2010 11:06:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2272&amp;PID=8960#8960</guid>
  </item> 
  <item>
   <title>Coroutine methods and UserState : It appears that none of the methods...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2272&amp;PID=8950#8950</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2272<br /><strong>Posted:</strong> 27-Oct-2010 at 7:03pm<br /><br />It appears that none of the methods on the Coroutine class (Start, StartParallel) take a userState parameter even though the resulting CoroutineOperation has a UserState property - and pretty much all other query-related&nbsp;methods in DevForce provide the userState parameter. &nbsp;Is this just an oversight? &nbsp;Can a userState parameter be added to the Coroutine methods?<div><br></div><div>Thanks!</div>]]>
   </description>
   <pubDate>Wed, 27 Oct 2010 19:03:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2272&amp;PID=8950#8950</guid>
  </item> 
 </channel>
</rss>