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

Cannot pickle reactive classes #692

Open
quant1729 opened this issue Mar 18, 2023 · 0 comments
Open

Cannot pickle reactive classes #692

quant1729 opened this issue Mar 18, 2023 · 0 comments

Comments

@quant1729
Copy link

quant1729 commented Mar 18, 2023

Describe the bug
The error is produced if one tries to pickle reactive classes (e.g. Subject).
TypeError: cannot pickle '_thread.RLock' object

Maybe it makes sense to add something like:

    def reduce_RLock(obj): return threading.RLock, tuple()
    copyreg.pickle(_thread.RLock, reduce_RLock)

To Reproduce
Steps to reproduce the behavior:

  1. Create a Subject object
  2. Pickle it

Expected behavior
The object is pickled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant