[Patches] [ python-Patches-731607 ] make threading join() method return a value
SourceForge.net
noreply@sourceforge.net
Sun, 04 May 2003 17:03:35 -0700
Patches item #731607, was opened at 2003-05-02 17:19
Message generated for change (Comment added) made by mboedick
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=731607&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthew Boedicker (mboedick)
Assigned to: Nobody/Anonymous (nobody)
Summary: make threading join() method return a value
Initial Comment:
This patch makes the join() method of a threading
module Thread return the value that was returned by the
callable that is running in the thread.
It came about because I needed to split a process into
a number of threads, join them all, and then check what
each of them returned before proceeding.
It against the current CVS tree, tested on Linux.
----------------------------------------------------------------------
>Comment By: Matthew Boedicker (mboedick)
Date: 2003-05-04 20:03
Message:
Logged In: YES
user_id=119895
The problem with using a Queue is that it requires whatever is running in the
thread to be aware it is running in a thread. It would force non-threaded
programs using that method to deal with Queues. With the patch, there
would be a standard, intuitive way to return data to the caller that worked
whether the method was running in a separate thread or not.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2003-05-02 17:35
Message:
Logged In: YES
user_id=357491
I don't think this is truly necessary. If you needed to
know what they would return just insert it into a Queue and
when the 'join' calls finish check the Queue to see what was
added.
It also deviates from Java's threading setup which
'threading' is based on.
I'm -1 on this patch.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=731607&group_id=5470