Skip to content

Use a thread pool #1

@adamghill

Description

@adamghill

The current implementation is very straight-forward: put functions in a dequeue and then pop them off and start a thread when request_finished is signalled.

However, instead of a dequeue, it could use a ThreadPoolExecutor.

Potential benefits:

  • prevents resource exhaustion if a ton of functions are scheduled
  • re-uses threads so they don't need to be created/destroyed for every scheduled function

Not sure if the code complexity is worth it, though.

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