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

Resources for threaded comms #1217

Open
shuds13 opened this issue Jan 9, 2024 · 0 comments
Open

Resources for threaded comms #1217

shuds13 opened this issue Jan 9, 2024 · 0 comments

Comments

@shuds13
Copy link
Member

shuds13 commented Jan 9, 2024

When threading is used for running workers (or if used just for generator), a modification is necessary for resources to work.

The resources object is held as a class attribute in Resources, which has a copy on each worker. This object contains the attribute self.worker_resources which contains the resource sets assigned to the current worker at a any point in time and is updated during the run. Currently, when using threads, this will be a single object and updated each time any worker updates it's resource sets.

One solution could be that when using threads, an array is used for self.worker_resources, and each worker points to it's own part of the array. If just running a generator on a thread, then there may be a self.gen_resources used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

1 participant