Skip to content
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