CallAsync

CallAsync ProcedureName([Parameter1],...)

Calls a sub or function to run in the background. Because this called function runs in the background, the result is not awaited for (thus discarded). The processing in the current thread immediately continues.

Public Function btnImport_OnClick(pContext) As String
   CallAsync ProcessImportInBackground(pContext)
   Return "The import will run in the background..."
End Function

Private Sub ProcessImportInBackground(pContext)
   Using Lock
       'Perform long taking import actions here...
   End Using
End Sub

See also: