This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: returning a result
Type: enhancement Stage: resolved
Components: Library (Lib) Versions:
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: James.Lu, berker.peksag, pitrou
Priority: normal Keywords:

Created on 2013-07-29 20:34 by James.Lu, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit James.Lu, 2013-07-29 20:34
Messages (4)
msg193899 - (view) Author: James Lu (James.Lu) * Date: 2013-07-29 20:34
I have attached a *possible* new version of
that returns the value of the target.
msg193902 - (view) Author: James Lu (James.Lu) * Date: 2013-07-29 20:38
run's calling function needs to return.
msg193903 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-07-29 20:44
Hi! I'm not sure what feature exactly you're proposing here, but please follow the devguide's guidelines to submit a proper patch:
And more generally:
msg263700 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-18 23:23
What is your use case? I think this can easily be implemented by subclassing the threading.Thread class:

    class MyThread(threading.Thread):

        def run(self):
            # skip try...finally to make the example shorter
            result = None
            if self._target:
                result = self._target(*self._args, **self._kwargs)
            return result

We can reopen this if you can share a valid use case. Thanks for the report!
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62791
2016-04-18 23:23:49berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg263700

resolution: rejected
stage: resolved
2013-07-29 20:44:46pitrousetnosy: + pitrou
messages: + msg193903
2013-07-29 20:38:37James.Lusetmessages: + msg193902
2013-07-29 20:34:10James.Lucreate