Skip to content

Thread pool in async std lib #39

Description

@enyone-pi

Problem

Currently, the Ixion standard async library creates a new thread for each task, but this is inconvenient if the user program wants to run multiple tasks.

Proposal

The simplest approach at the moment is to use a thread pool. After a task completes, we don't delete the thread, but rather place it in the pool. If the user program starts another task, we don't create a new thread, but reuse the thread from the pool.

Note

We also need to clean up the pool. For example, if a thread has been in the pool for more than X amount of time (e.g., 25 seconds), we delete that thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions