0
kicks
Using async / await
Using async / awaitUsing async / await
this post will discuss parallel disposal.
whenever we want to dispose a parallel execution upon completion we can't use the convenient using keyword.
for example, the following code may be dispose the command before completion:Very bad Code Snippetusing (var conn = newSqlConnection(CONN_STR))using (var cmd = newSqlCommand("Select * from Employee", conn)) { conn.Open(); cmd.BeginExecuteReader(ar => {int affected = cmd.EndExecuteNonQuery(ar); ...