How to use async in sync code?

时间:2017-08-30 20:09:42

标签: c# asynchronous async-await

Async method (works fine in async code):

  <dependentAssembly>
    <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a"
                      culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
  </dependentAssembly>

And I try to call it from sync code:

specific_value      name    surname random_value
1              1      Luke  Skywalker            1
2              1      Luke  Skywalker            2
3              1 Skywalker       Luke            3
4              2      Leia     Organa            4
5              3       Han       Solo            5
6              2    Organa       Leia            6
7              1       Ben       Solo            7
8              5     Lando Calrissian            8

I can't see any issue, so it I just stuck.

What I do wrong?

0 个答案:

没有答案