views:

26

answers:

1

Hi All,

I'm using .Net 4.0 parallel library. The tasks I execute, ask to run some other task, sometimes synchronously and sometimes asynchronously, depending on some conditions which are not known in advanced. For async call, i simply create new tasks and that's it. I don't know how to handly sync call: how to run it from the same thread, maybe that sync tasks will also ask to execute sync tasks recursively. all this issue is pretty new to me.

thanks in advance.

A: 

You can just call Task.RunSynchronously() on it, instead of Task.Start().

tzaman