Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-82300: Add track parameter to shared memory#110778

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpshead merged 28 commits intopython:mainfrompan324:shmemuntrack
Dec 5, 2023
Merged
Changes from1 commit
Commits
Show all changes
28 commits
Select commitHold shift + click to select a range
3be08b4
add track parameter to shared memory
pan324Oct 12, 2023
f50812a
phrasing
pan324Oct 12, 2023
cbc8431
📜🤖 Added by blurb_it.
blurb-it[bot]Oct 12, 2023
7138447
phrasing
pan324Oct 12, 2023
6bbfca6
Merge branch 'main' of https://github.com/python/cpython into shmemun…
pan324Oct 12, 2023
db79426
Merge branch 'python:main' into shmemuntrack
pan324Oct 12, 2023
db11894
Merge branch 'shmemuntrack' of github.com:pan324/cpython into shmemun…
pan324Oct 12, 2023
d44cb82
Delete Doc/library/result.html
pan324Oct 12, 2023
c62cff0
Merge branch 'main' into shmemuntrack
ambvOct 13, 2023
dcda10f
Update Misc/NEWS.d/next/Library/2023-10-12-18-19-47.gh-issue-82300.P8…
pan324Oct 15, 2023
63d21d7
Update Doc/library/multiprocessing.shared_memory.rst
pan324Oct 15, 2023
e990e41
Update Doc/library/multiprocessing.shared_memory.rst
pan324Oct 15, 2023
9c593ba
Removed TypeError. Clarified documentation.
pan324Oct 17, 2023
9ef1ff3
untracking shmem can unlink now
pan324Oct 17, 2023
e5fe674
Update Doc/library/multiprocessing.shared_memory.rst
pan324Oct 19, 2023
66acf90
removed unneeded try-except
pan324Oct 19, 2023
3fdf625
phrasing of track parameter
pan324Oct 19, 2023
d65e3f8
Update Doc/library/multiprocessing.shared_memory.rst
pan324Oct 24, 2023
a97c6d3
untracking test
pan324Oct 24, 2023
17c07f5
untrack tests both track=True and track=False
pan324Oct 25, 2023
13f3fb6
untrack tests both track=True and track=False
pan324Oct 25, 2023
7c7f0e7
untrack tests both track=True and track=False
pan324Oct 25, 2023
765afb7
reliable test cleanup
pan324Nov 30, 2023
a5848c1
Update Doc/library/multiprocessing.shared_memory.rst
pan324Dec 1, 2023
8255e01
split tests
pan324Dec 1, 2023
5d89117
split tests
pan324Dec 1, 2023
66db5b8
style: add a missing blank line
gpsheadDec 2, 2023
52053f8
Merge branch 'main' into shmemuntrack
gpsheadDec 2, 2023
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
PrevPrevious commit
NextNext commit
phrasing of track parameter
  • Loading branch information
@pan324
pan324 committedOct 19, 2023
commit3fdf625fd8b20720d8c6522c50c107956a3fefdb
26 changes: 16 additions & 10 deletionsDoc/library/multiprocessing.shared_memory.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,16 +67,19 @@ copying of data.
*track*, when enabled, registers the shared memory block with a resource
tracker process. This process ensures proper cleanup of shared memory
blocks even when all other processes with access to the memory have failed
to do so (mainly due to being killed by signals). Unless a Python process
was created using any of the :mod:`multiprocessing` facilities (such as
:class:`multiprocessing.Process`), it will receive its own resource tracker
process when accessing shared memory with *track* enabled. This will cause
the shared memory to be deleted by the resource tracker of the first
process that terminates. To avoid this issue, users of :mod:`subprocess` or
standalone Python processes should set *track* to ``False`` when there is
already another process in place that does the bookkeeping. *track* has
an effect only on POSIX. Windows has its own tracking and does not use the
resource tracker.
to do so (mainly due to being killed by signals).
Python processes created from a common ancestor using :mod:`multiprocessing`
facilities share a single resource tracker process, and the lifetime of
shared memory segments is handled automatically among these processes.
Python processes created in any other way will receive their own own
resource tracker when accessing shared memory with *track* enabled.
This will cause the shared memory to be deleted by the resource tracker
of the first process that terminates.
To avoid this issue, users of :mod:`subprocess` or standalone Python
processes should set *track* to ``False`` when there is already another
process in place that does the bookkeeping.
*track* is ignored on Windows, which has its own tracking and
automatically deletes shared memory when all handles to it have been closed.

.. versionchanged:: 3.13 Added *track* parameter.

Expand All@@ -98,6 +101,9 @@ copying of data.
trying to access data inside a shared memory block after :meth:`unlink()`
may result in memory access errors, depending on platform.

This method has no effect on Windows, where the only way to delete a
shared memory block is to close all handles.

.. attribute:: buf

A memoryview of contents of the shared memory block.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp