Skip to content

Feasibility of spawn_sync #7

@UsernameN0tAvailable

Description

@UsernameN0tAvailable

Since this is a 'futures-executor' it is understandable that Threadpool::spawn and Threadpool::spawn_ok execute futures.

However when spawning multiple threads from an async function, the lifetime of everything that is moved inside the async scopes have to be 'static, even if you join all the spawned threads.

Would it be possible to add a Threadpool::spawn_sync to execute non-async scopes in order to move in references to the scopes (without the need of Arc) that are executed on the threads?

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