Skip to content

Template-ify Task and Taskflow for type-erasure backend #744

@doocman

Description

@doocman

Today Taskflow and Task:s uses std::function<...> unconditionally for all type-erasing operations. Sometimes, however, a user may need to use their own type-erasure, or there are circumstances that make the standard function suboptimal (I have also seen an issue regarding using 'delegate' instead, which also aligns with this request).
I am proposing that we follow the 'standard' (STL) style and create
template </*something function*/> BasicTask
and
template </*something function*/> BasicTaskflow
(similar to std::basic_string) and replace current Task and Taskflow with type-aliases:
using Task = BasicTask<std::function<void()>>;
and similar for Taskflow. This should be fully backwards compatible and doable since Taskflow is a header-only library anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions