Skip to content

Add SynchronizedBase to __all__ in multiprocessing.sharedctypes #110304

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Lib/multiprocessing/sharedctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@
from .context import reduction, assert_spawning
_ForkingPickler = reduction.ForkingPickler

__all__ = ['RawValue', 'RawArray', 'Value', 'Array', 'copy', 'synchronized']
__all__ = [
# Methods for getting ctypes in shared memory
'RawValue', 'RawArray',
# Methods for getting synchronization wrappers
'Value', 'Array',
# The synchronization types
'Synchronized', 'SynchronizedArray', 'SynchronizedString',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not documented and therefore not properly public, why should they be added to __all__?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original context of the code I was writing is lost, but I feel like I covered it pretty well in the PR description. This is to make it easier to type multiprocessing code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(By which I mean use types with… not physically type on a keyboard)

# Misc functions
'copy', 'synchronized'
]

#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Export :class:`multiprocessing.Synchronized`,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this will have to be changed to a different file?

:class:`multiprocessing.SynchronizedArray`, and
:class:`multiprocessing.SynchronizedString` so multiprocessing users can
annotate their code well.
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy