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-124694: Add concurrent.futures.InterpreterPoolExecutor#124548

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
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
39 commits
Select commitHold shift + click to select a range
5c69d38
Make ThreadPoolExecutor extensible.
ericsnowcurrentlySep 25, 2024
01789be
Add InterpreterPoolExecutor.
ericsnowcurrentlySep 25, 2024
6def4be
Clean up the interpreter if initialize() fails.
ericsnowcurrentlySep 27, 2024
84993a5
Add a missing import.
ericsnowcurrentlySep 27, 2024
c540cf0
Fix some typos.
ericsnowcurrentlySep 27, 2024
45d584d
Add more tests.
ericsnowcurrentlySep 27, 2024
c90c016
Add docs.
ericsnowcurrentlySep 27, 2024
1cb4657
Add a NEwS entry.
ericsnowcurrentlySep 27, 2024
4dc0989
Fix the last test.
ericsnowcurrentlySep 27, 2024
57b2db6
Add more tests.
ericsnowcurrentlySep 27, 2024
75e11d2
Simplify ExecutionFailed.
ericsnowcurrentlySep 30, 2024
69c2b8e
Fix the signature of resolve_task().
ericsnowcurrentlySep 30, 2024
f03c314
Capture any uncaught exception.
ericsnowcurrentlySep 30, 2024
4806d9f
Add TODO comments.
ericsnowcurrentlySep 30, 2024
efc0395
Docs fixes.
ericsnowcurrentlySep 30, 2024
a29aee3
Automatically apply textwrap.dedent() to scripts.
ericsnowcurrentlySep 30, 2024
8bab457
Fix the WASI build.
ericsnowcurrentlySep 30, 2024
cd29914
wasi
ericsnowcurrentlyOct 1, 2024
0287f3b
Ignore race in test.
ericsnowcurrentlyOct 1, 2024
80cd7b1
Add BrokenInterpreterPool.
ericsnowcurrentlyOct 8, 2024
f8d4273
Tweak the docs.
ericsnowcurrentlyOct 8, 2024
3a8bfce
Clarify the InterpreterPoolExecutor docs.
ericsnowcurrentlyOct 8, 2024
af6c27a
Catch all exceptions.
ericsnowcurrentlyOct 8, 2024
8c0a405
Factor out exception serialization helpers.
ericsnowcurrentlyOct 8, 2024
1ae7ca2
Set the ExecutionFailed error as __cause__.
ericsnowcurrentlyOct 8, 2024
d24e85d
Drop the exception serialization helpers.
ericsnowcurrentlyOct 8, 2024
05a03ad
Always finalize if there is an error in initialize().
ericsnowcurrentlyOct 8, 2024
f150931
Explicitly note the problem with functions defined in __main__.
ericsnowcurrentlyOct 8, 2024
97d0292
Handle the case where interpreters.queues doesn't exist.
ericsnowcurrentlyOct 8, 2024
baf0504
Merge branch 'main' into interpreter-pool-executor
ericsnowcurrentlyOct 15, 2024
5c3a327
Add a What's New entry about InterpreterPoolExecutor.
ericsnowcurrentlyOct 15, 2024
a2032a8
Fix a typo.
ericsnowcurrentlyOct 15, 2024
54119b8
Fix the documented signature.
ericsnowcurrentlyOct 15, 2024
744dca7
Test and document asyncio support.
ericsnowcurrentlyOct 15, 2024
f61d62d
Apply suggestions from code review
ericsnowcurrentlyOct 16, 2024
ee65bb2
Expand the docs.
ericsnowcurrentlyOct 16, 2024
a7f5c50
For now, drop support for scripts.
ericsnowcurrentlyOct 16, 2024
b148e09
Fix a TODO comment.
ericsnowcurrentlyOct 16, 2024
e365ae7
Fix the docs.
ericsnowcurrentlyOct 16, 2024
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
Fix the signature of resolve_task().
  • Loading branch information
@ericsnowcurrently
ericsnowcurrently committedSep 30, 2024
commit69c2b8efe501154d0811d42b3fa8fed27340aa07
2 changes: 1 addition & 1 deletionLib/concurrent/futures/interpreter.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,7 @@ def prepare(cls, initializer, initargs, shared):
initscript = None
def create_context():
return cls(initscript, shared)
def resolve_task(cls,fn, args, kwargs):
def resolve_task(fn, args, kwargs):
if isinstance(fn, str):
if args or kwargs:
raise ValueError(f'a script does not take args or kwargs, got {args!r} and {kwargs!r}')
Expand Down
4 changes: 2 additions & 2 deletionsLib/concurrent/futures/thread.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,7 @@ def prepare(cls, initializer, initargs):
raise TypeError("initializer must be a callable")
def create_context():
return cls(initializer, initargs)
def resolve_task(cls,fn, args, kwargs):
def resolve_task(fn, args, kwargs):
return (fn, args, kwargs)
return create_context, resolve_task

Expand DownExpand Up@@ -205,7 +205,7 @@ def submit(self, fn, /, *args, **kwargs):
'interpreter shutdown')

f = _base.Future()
task = self._resolve_work_item_task(f,fn, args, kwargs)
task = self._resolve_work_item_task(fn, args, kwargs)
w = _WorkItem(f, task)

self._work_queue.put(w)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp