Skip to content

Enhancement: parallelization of UniqueList  #28

Description

@marcusritter1

I suggest adding these two functions to the unique_list.py file.
It will make the UniqueList picklable and thus enable parallelization, e.g., with multiprocessing or concurrent.futures.

def __reduce__(self):
        return (self.__class__, (list(self),))

def __setstate__(self, state):
    self._set = set(state)
    super().__init__(state)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions