Having just discovered ServiceFeatureTable I am now converting my code to use them. I have an opportunity to execute 2 queries in parallel, but I can't work out how to do it.
Code fragment 1 shows my Serial code. It works correctly.
Dim sft_SA4 As New ServiceFeatureTable(New Uri($"{MAPSERVER_SA4}"))
Dim sft_SA3 As New ServiceFeatureTable(New Uri($"{MAPSERVER_SA3}"))
Dim myquery As New QueryParameters
Dim fc1 As FeatureQueryResult, fc2 As FeatureQueryResult
fc1 = Await sft_SA4.QueryFeaturesAsync(myquery).ConfigureAwait(False)
fc2 = Await sft_SA3.QueryFeaturesAsync(myquery).ConfigureAwait(False)
Code fragment 2 shows my attempt to run both these queries in parallel. It compiles, but when run it just hangs at the WhenAll statement
Dim sft_SA4 As New ServiceFeatureTable(New Uri($"{MAPSERVER_SA4}"))
Dim sft_SA3 As New ServiceFeatureTable(New Uri($"{MAPSERVER_SA3}"))
Dim myquery As New QueryParameters
Dim fc1 As FeatureQueryResult, fc2 As FeatureQueryResult
Dim t1 = sft_SA4.QueryFeaturesAsync(myquery)
Dim t2 = sft_SA3.QueryFeaturesAsync(myquery)
Await Task.WhenAll(t1, t2) ' both complete
fc1 = t1.Result
fc2 = t1.result What have I done wrong? (myquery is populated elsewhere, but left out for clarity)