Bug report
Bug description:
I recently got the following traceback in my code:
Traceback (most recent call last):
File "multiprocessing\queues.py", line 244, in _feed
File "multiprocessing\reduction.py", line 51, in dumps
TypeError: cannot pickle '_thread.RLock' object
Unfortunately, there's nothing about this traceback that is useful or helpful to me. I started digging through the logic and it appears that multiprocessing.Queue has a worker thread where it does the pickling. The unfortunate side-effect of this is that if there a pickling error, it doesn't happen in a useful context. If the pickling could happen before the data is handed off to the worker thread, then a much more useful traceback could be generated.
CPython versions tested on:
3.11
Operating systems tested on:
Windows
Bug report
Bug description:
I recently got the following traceback in my code:
Unfortunately, there's nothing about this traceback that is useful or helpful to me. I started digging through the logic and it appears that multiprocessing.Queue has a worker thread where it does the pickling. The unfortunate side-effect of this is that if there a pickling error, it doesn't happen in a useful context. If the pickling could happen before the data is handed off to the worker thread, then a much more useful traceback could be generated.
CPython versions tested on:
3.11
Operating systems tested on:
Windows