Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use max_cores in taskQueue instead of system cores #2038

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 6, 2024

  1. Update executors.py

    The class TascQueue accepts an argument `thread_count` that is used for the max size of a queue.
    
    In the `MultithreadedJobExecutor `class there is a variable defined (`max_cores`) that is getting its value from the available cores of the machine. Further down in the same class when TaskQueue is called instead of using the `max_cores` it is using `psutil.cpu_count()`. 
    
    I suggest to use  the self.max_cores in the call of TaskQueue in the file executor.py instead of psutil.cpu_count()
    
    Use case:
    when a job executor is setup as MultithreadedJobExecutor one can override the max_cores after the initialization of the object and limit the use to the specified cores.
    
    Additional enhancement would be to include an argument to allow the use to provide the number of cores available for use
    kmavrommatis authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    2b587cc View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from kmavrommatis/kmavrommatis-patch-1

    Update executors.py
    kmavrommatis authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    83a49f1 View commit details
    Browse the repository at this point in the history