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-134173: Optimize concurrent.futures→asyncio state transfer with atomic snapshot#134174

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
kumaraditya303 merged 9 commits intopython:mainfrombdraco:thread_to_asyncio_slow
May 18, 2025
Merged
Changes from1 commit
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
PrevPrevious commit
NextNext commit
use threading_helper.start_threads
  • Loading branch information
@bdraco
bdraco committedMay 18, 2025
commit8839e71c26af6c9ed4925736465a6c5fa7d33f5f
11 changes: 3 additions & 8 deletionsLib/test/test_concurrent_futures/test_future.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@
PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED, Future)

from test import support
from test.support import threading_helper

from .util import (
PENDING_FUTURE, RUNNING_FUTURE, CANCELLED_FUTURE,
Expand DownExpand Up@@ -330,14 +331,8 @@ def get_snapshot():
snapshot = f._get_snapshot()
results.append(snapshot)

threads = []
for _ in range(4):
t = threading.Thread(target=get_snapshot)
threads.append(t)
t.start()

for t in threads:
t.join()
threads = [threading.Thread(target=get_snapshot) for _ in range(4)]
threading_helper.start_threads(threads)

# All snapshots should be identical for a finished future
expected = (True, False, 100, None)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp