It is not clear why you are using the await
keyword. If you do not need a 'continuation' of the required task, start it using
var result = Task.Factory.StartNew(() => LongRunningMethod());
It is likely (but not guaranteed due to the small amount of code you have given) that you have code after the call to await
. await
is causing a continuation to be setup which will run using a different synchronisation context that that used to run your LongRunningMethod()
which will run on a background thread-pool thread.
I hope this helps.