Visitar URL original
bpo-45689: Custom Name for ThreadPoolExecutor by RahulARanger · Pull Request #29359 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260111043439/https://github.com/python/cpython/pull/29359
Skip to content

Conversation

@RahulARanger
Copy link

@RahulARanger RahulARanger commented Nov 2, 2021 •

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@RahulARanger

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@AlexWaygood
Copy link
Member

AlexWaygood commented Nov 3, 2021 •

You'll want to edit the title of your PR to "bpo-45689: Custom Name for ThreadPoolExecutor" — the bots can't detect the issue number if you only have it in a comment. A PR is also unlikely to be accepted unless you've written tests for your new feature 🙂

@RahulARanger RahulARanger changed the title Custom Name for ThreadPoolExecutor [bpo-45689](https://bugs.python.org/issue45689) Custom Name for ThreadPoolExecutor Nov 3, 2021
@RahulARanger RahulARanger changed the title [bpo-45689](https://bugs.python.org/issue45689) Custom Name for ThreadPoolExecutor bpo-45689: https://bugs.python.org/issue45689) Custom Name for ThreadPoolExecutor Nov 3, 2021
@RahulARanger RahulARanger changed the title bpo-45689: https://bugs.python.org/issue45689) Custom Name for ThreadPoolExecutor bpo-45689: Custom Name for ThreadPoolExecutor Nov 3, 2021
@RahulARanger
Copy link
Author

You'll want to edit the title of your PR to "bpo-45689: Custom Name for ThreadPoolExecutor" — the bots can't detect the issue number if you only have it in a comment. A PR is also unlikely to be accepted unless you've written tests for your new feature 🙂

Thank you, I thought # in the Comment was the title. I have also written a simple Test Case.

@AlexWaygood
Copy link
Member

I have also written a simple Test Case.

Any tests you write should be included in your PR. You should also check to make sure that the changes you've made don't break any of the existing tests. There's a guide on how to write tests for your PR here 🙂https://devguide.python.org/runtests/. You'll find the existing tests for concurrent.futures here: https://github.com/python/cpython/blob/main/Lib/test/test_concurrent_futures.py

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Good job on revising the test file!

A PR proposing a new feature should probably also propose changes to the documentation. You can find the documentation for concurrent.futures here, and there's a guide to writing documentation for CPython here.

Given that, if accepted, this would be your first contribution to CPython, you might also want to propose adding your name to the Misc/ACKS file 🙂 (Though that's not compulsory -- just something you might like to do!)

Lastly, if you want this PR to be accepted, I think you probably need to give a more detailed description in the bugs.python.org issue of why this feature would be useful. What problems would it solve, that are currently unsolveable? What are some examples of some cool ways you would use your new feature? Writing documentation for your feature may help you think through these questions 🙂

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Base Executor now has submit_with_name method which allows ThreadPoolExecutor for optional setting name for Threads
previously it assumed tuple as a Future object which is an element that was inserted into a queue.
previously it assumed tuple as a Future object which is an element that was inserted into a queue.[2]
Added test_thread_with_custom_name,
test_thread_with_prefix_or_custom_name in ThreadPoolShutdownTest
@mdickinson mdickinson removed their request for review November 9, 2021 17:56
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.

6 participants