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.
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_resourceswhich 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 aself.gen_resourcesused.