When I try to run the code below, perform synchronous operations. Why?
I get the following warning ...
Warning 1 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
private async void btProcessa_Click(object sender, EventArgs e)
{
await ProcessaA();
await ProcessaB();
}
public async Task ProcessaA()
{
for (int i = 0; i <= 100; i++)
{
pbProcessoA.Value = i;
Thread.Sleep(500);
}
}
public async Task ProcessaB()
{
for (int i = 0; i <= 100; i++)
{
pbProcessoB.Value = i;
Thread.Sleep(500);
}
}