I have a web application and need copy a batch of files from one file share server to another after a button click, async and awit seems to be a good way for this. I am not sure do I need Task.Run here? Is RunMoving() better move into another class for performance?
Here is my VB.NET code as following:
Public Sub FileMoving()
PdfsMovingAsync()
DoSomethingElse()
End Sub
Private Async Sub PdfsMovingAsync()
Await Task.Run(Sub() RunMoving())
End Sub
Private Sub RunMoving()
'Thread.Sleep(2000)
End Sub