AnsweredAssumed Answered

BUG? GenerateGeodatabaseAsync returns immediately

Question asked by kor_ on Nov 27, 2014
Latest reply on Nov 27, 2014 by kor_

I'm calling the GenerateGeodatabaseAsync method (with the await keyword) of GeodatabaseSyncTask and the method returns immediately. The method is marked as Async, so I'd expect it to wait until the task has been completed.


Can anyone confirm this behaviour or explain why it behaves differently from normal Async behaviour?




public async Task<GenerateGeodatabaseResult>(Uri uri)
    var gdbTask = new GeodatabaseSyncTask(uri);

    // ...
    // this returns immediately (as if it was an async void method)
    return await gdbTask.GenerateGeodatabaseAsync(gdbParams, GdbCompleteCallback, new TimeSpan(0, 0, 5), progress, cancelToken);