Skip to content

enqueue: provide variadic function #6

@daniel-j-h

Description

@daniel-j-h

For now we're able to enqueue e.g. lambdas, or use std::bind to curry functions taking various arguments.

It would be reasonable to provide a variadic enqueue instead, taking various arguments and simply passing them on, e.g.

template<typename Function, typename... Args>
auto enqueue(Function&& f, Args&&... args) -> std::future<decltype(std::forward<F>(f)(std::forward<Args>(args)...))>;

The behavior should be similar to e.g. std::thread's interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions