Skip to content

bpo-39609: set the thread_name_prefix for the default asyncio executor #18458

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

Conversation

mmohrhard
Copy link
Contributor

@mmohrhard mmohrhard commented Feb 11, 2020

Just a small debugging improvement to identify the asyncio executor threads.

https://bugs.python.org/issue39609

Automerge-Triggered-By: @asvetlov

@mmohrhard mmohrhard force-pushed the bpo39609-add_thread_name_prefix_to_asyncio_executor branch from 7ca1ec6 to b9078e6 Compare February 11, 2020 11:46
@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #18458 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18458      +/-   ##
==========================================
- Coverage   82.20%   82.12%   -0.09%     
==========================================
  Files        1957     1954       -3     
  Lines      589324   583606    -5718     
  Branches    44428    44428              
==========================================
- Hits       484430   479259    -5171     
+ Misses      95233    94702     -531     
+ Partials     9661     9645      -16     
Impacted Files Coverage Δ
Lib/distutils/tests/test_bdist_rpm.py 30.00% <0.00%> (-65.00%) ⬇️
Lib/distutils/command/bdist_rpm.py 7.63% <0.00%> (-56.88%) ⬇️
Lib/test/test_urllib2net.py 76.92% <0.00%> (-13.85%) ⬇️
Lib/test/test_smtpnet.py 78.57% <0.00%> (-12.86%) ⬇️
Lib/ftplib.py 63.85% <0.00%> (-6.06%) ⬇️
Lib/test/test_ftplib.py 87.11% <0.00%> (-4.72%) ⬇️
Lib/dbm/__init__.py 66.66% <0.00%> (-4.45%) ⬇️
Tools/scripts/db2pickle.py 17.82% <0.00%> (-3.97%) ⬇️
Lib/test/test_socket.py 71.94% <0.00%> (-3.87%) ⬇️
Tools/scripts/pickle2db.py 16.98% <0.00%> (-3.78%) ⬇️
... and 317 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4eb9f43...b9078e6. Read the comment docs.

@@ -806,7 +806,9 @@ def run_in_executor(self, executor, func, *args):
# Only check when the default executor is being used
self._check_default_executor()
if executor is None:
executor = concurrent.futures.ThreadPoolExecutor()
executor = concurrent.futures.ThreadPoolExecutor(
thread_name_prefix='asyncio_default_executor'
Copy link
Contributor

Choose a reason for hiding this comment

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

A shorter name is better, please apply it.

Suggested change
thread_name_prefix='asyncio_default_executor'
thread_name_prefix='asyncio'

@mmohrhard mmohrhard force-pushed the bpo39609-add_thread_name_prefix_to_asyncio_executor branch from b9078e6 to d9d31c9 Compare February 27, 2020 19:32
@miss-islington
Copy link
Contributor

Sorry, I can't merge this PR. Reason: Base branch was modified. Review and try the merge again..

@miss-islington miss-islington merged commit 374d998 into python:master Feb 27, 2020
@asvetlov
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants