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

Pass instance method to map/starmap #99

Open
prathik-quartic opened this issue Jun 4, 2021 · 0 comments
Open

Pass instance method to map/starmap #99

prathik-quartic opened this issue Jun 4, 2021 · 0 comments

Comments

@prathik-quartic
Copy link

prathik-quartic commented Jun 4, 2021

Description

Can we provide a instance method instead of a static function?

async with Pool() as pool:
    await pool.map(self.write_data, node)

I get back this error. Not sure what to make of this error.

Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 239, in _feed
    obj = _ForkingPickler.dumps(obj)
  File "/usr/lib/python3.8/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
TypeError: cannot pickle '_thread.lock' object

Can someone please help me out?

Details

  • OS: Ubuntu-20
  • Python version: 3.8
  • aiomultiprocess version: 0.9.0
  • Can you repro on master?
  • Can you repro in a clean virtualenv?
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