Skip to content

Support parameter pack for Env threads #8285

Closed
@pdillinger

Description

I tend to use std::thread because it supports functional static polymorphism with parameter packs. In other words, I can create a thread from an arbitrary function by providing arguments to the function, with full type checking, rather than casting through a single void *.

Filed at request of @mrambacher in #8225

This support could probably be generically bolted on in Env by wrapping a target with parameters in a heap-allocated std::function<void()>*, cast to void *, and in an unwrapper, cast back, executed, and deleted.

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