This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bjs
Recipients bjs
Date 2019-07-22.15:13:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org>
In-reply-to
Content
When running the attached on 3.8 and 3.9 (master) I get the following:

Process Process-3:
Traceback (most recent call last):                                                                                                                       
  File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 313, in _bootstrap
    self.run()    
  File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/bjs/Downloads/e4671450a50df5a0648c6dda0c7b642a-3db67c29d8d9e6a6d629c2c016f5853ec22000ed/test.py", line 14, in g
    X[0]
  File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/shared_memory.py", line 413, in __getitem__
    (v,) = struct.unpack_from(
ValueError: not enough values to unpack (expected 1, got 0)

(Tested on Windows and Linux)

Either this is a documentation error,  and the docs for shared_memory should state that the ShareableList does not have atomic operations and so this is unsafe,  or this is a suspicious behaviour.  I'm not sure which.

I could also just be using the library totally incorrectly.
History
Date User Action Args
2019-07-22 15:13:18bjssetrecipients: + bjs
2019-07-22 15:13:18bjssetmessageid: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org>
2019-07-22 15:13:18bjslinkissue37652 messages
2019-07-22 15:13:17bjscreate