Skip to content

Multiple task_system and system_timer are being created #166

@aaronalbers

Description

@aaronalbers

The function operators for default_executor_type and system_timer_type are templated and therefore will have unique static local variables depending on the number of different parameter types used in the target application.

Simple example that illustrates the problem:
http://cpp.sh/6vpmi

A potential fix is to use the polymorphic task that is already available rather than templates.

void operator()(task<void()>&& f) const {
        static task_system only_task_system;
        only_task_system(std::forward<task<void()>>(f));
}

That polymorphic task could also be propagated to the underlying task_system and system_timer function operators as to better indicate that only one type will be passed rather than any supported type.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions