开发者

Activate thread synchronically

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 conditi开发者_StackOverflow社区ons 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜