New Posts New Posts RSS Feed: Executing parallel task issue!
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Executing parallel task issue!

 Post Reply Post Reply
Author
katit View Drop Down
Senior Member
Senior Member


Joined: 09-Sep-2011
Posts: 146
Post Options Post Options   Quote katit Quote  Post ReplyReply Direct Link To This Post Topic: Executing parallel task issue!
    Posted: 12-Mar-2013 at 7:35pm
Migrating to 2012.. Didn't think it will be so much work with all the lambdas I have!

Anyway, I think I got a hang of async/await stuff and all is well except for parallel coroutines.

Documentation: http://drc.ideablade.com/devforce-2012/bin/view/Documentation/program-asynchronously

suggests I use "await Task.WhenAll(..)"

Silverlight doesn't have .WhenAll, only .WaitAll and it is not awaitable. When I try to do Task.WaitAll - I get lock issue..

Is there something I'm missing here?
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: 12-Mar-2013 at 7:49pm
In Silverlight you can await TaskEx.WhenAll.
 
The Compatibility library also includes Coroutines if you find converting all your code to DF2012 too much work for now.
Back to Top
katit View Drop Down
Senior Member
Senior Member


Joined: 09-Sep-2011
Posts: 146
Post Options Post Options   Quote katit Quote  Post ReplyReply Direct Link To This Post Posted: 12-Mar-2013 at 7:58pm
Thanks for quick reply!

Yeah, I already started. Big task but I'd rather do it right. It is also learning async/await pattern in addition to migrating..
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 12-Mar-2013 at 9:07pm
There's also Cocktail's TaskFns class, which has platform independent implementations of WhenAll etc. in case you ever intend to share source code between platforms.


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down