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

bpo-35813: Added shared_memory submodule of multiprocessing. #11664

Merged
merged 8 commits into from
Feb 2, 2019
Prev Previous commit
Next Next commit
Fixed as yet unsupported expression, added news entry.
  • Loading branch information
applio committed Jan 24, 2019
commit fa42acf4c77af10ec8761f3a93e69aebbb019dff
14 changes: 7 additions & 7 deletions Lib/multiprocessing/shared_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def shareable_wrap(
type(existing_obj)
)

agg = existing_obj.itemsize
size = [ agg := i * agg for i in existing_obj.shape ][-1]
#agg = existing_obj.itemsize
#size = [ agg := i * agg for i in existing_obj.shape ][-1]
# TODO: replace use of reduce below with above 2 lines once available
#size = reduce(
# lambda x, y: x * y,
# existing_obj.shape,
# existing_obj.itemsize
#)
size = reduce(
lambda x, y: x * y,
existing_obj.shape,
existing_obj.itemsize
)

else:
assert shmem_name is not None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Shared memory submodule added to multiprocessing to avoid need for
serialization between processes