Task migration #276
Conversation
There was a problem hiding this comment.
At the Croydon meeting the allocator_arg_t position was fixed to be the parameter of the coroutine function (and the allocator folllowing that, of course). Thus, find_allocator doesn't really need to recurse or could be omitted entirely.
There was a problem hiding this comment.
I was considering removing find_allocator.hpp entirely because the new allocator_support functionality handles the allocator-aware coroutine allocation path directly. I kept it for now because I was not fully sure whether there was still a use case that expected find_allocator to remain as a separate utility.
| // ---------------------------------------------------------------------------- | ||
|
|
||
| #endif // INCLUDED_BEMAN_EXECUTION_DETAIL_CONTEXT_ERROR_TYPES_OF | ||
| #endif // INCLUDED_BEMAN_EXECUTION_DETAIL_TASK_ERROR_TYPES_OF |
There was a problem hiding this comment.
This comment on the trailing #endif seems unusual. Maybe instead of fixing it remove it? In theory these comments should be added/removed by a code formatting tool like clang-format (I don't know if that actually does such transformations).
There was a problem hiding this comment.
Fixed. Might of forgot to run clang-format -i on this file
The file is moved to the `task` subdirectory
continue the migration of components from
beman.taskintobeman.execution.The main changes are:
beman/execution/task.hppheader so users can refer tobeman::execution::task.beman::execution::detailas part of thebeman.taskmigration.The current branch keeps the task internals directly under
beman::execution::detail. I would appreciate feedback on whether this layout is perfered, or whether the task-specific components should instead be grouped under a nested namespace such asbeman::execution::detail::taskfor better modularization.allocator_support.hppto better align with the allocator model described in P3980R1.The task implementation is organized under
include/beman/execution/detail/task/instead of placing all task internals directly indetail/.Current structure:
include/beman/execution/ ├── execution.hpp ├── functional.hpp ├── stop_token.hpp ├── task.hpp └── detail/ └── task/ ├── allocator_of.hpp ├── completion.hpp ├── error_types_of.hpp ├── handle.hpp ├── poly.hpp ├── promise_env.hpp ├── state_rep.hpp └── stop_source_of.hppall
taskrelated functionality will be added under/task.