0
leonkosak created
Based on all conversations on GitHub when mixing async and sync code, I would like to know if calling DataSourceLoader.Load in Task is REALLY safe (no thread starvation or other runtime problems possible?
public async Task<object> Get(DataSourceLoadOptions loadOptions)
{
object result = await Task.Run(() => DataSourceLoader.Load(SampleData.Orders, loadOptions));
return result;
}
https://www.devexpress.com/Support/Center/Question/Details/T621512/how-to-use-datasourceloader-in-an-async-controller-action
Thank you for explanations.
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
2 Answer(s)
-
0
Hi @leonkosak
Couldn't be sure at the moment. But, if there is a problem, you will get ObjectDisposedException.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
It works (at least we haven't had issues yet). :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)