dotnetcore / dotnetcore/FlubuCore
DependsOnAsync, AddTasksAsync and DoAsync naming
- Dominant language
- C#
- Stars
- 937
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Suggestion from @huanlin :
> While fixing this bug, one idea popped up:
>
> The tasks configured with `DependsOnAsync` method are actually executed with `Task.Run`, which is arguably not asynchronous calls. I mean the following code in TaskBase.cs:
>
> ``` C#
> protected virtual async Task DoExecuteAsync(ITaskContextInternal context)
> {
> return await Task.Run(() => DoExecute(context));
> }
> ```
>
> Having said that, I don't have better ideas to run those "Async" tasks simply because we don't know what those user-defined tasks really do (could be CPU-bound or I/O bound).
>
> I'm just feel that `DependsOnAsync` might mislead people, make them think that those tasks are executed with C# asynchronous calls.
>
> So one possible change is to rename `DependsOnAsync` to something else, maybe `DependsOnParallel` or `DependsOnConcurrently` ?
>
> I may be wrong or missed something though. So this is just a note. No further action requested. (discussions are welcomed)
Contributor guide
Assessment
This issue has not been assessed yet.