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.

classification
Title: 2 Tools for easy inter-thread communication->Queue,threading
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: josiahcarlson, kxroberto, loewis, rhettinger
Priority: normal Keywords: patch

Created on 2006-03-20 11:46 by kxroberto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Queue_threading_calls.py kxroberto, 2006-03-20 11:46
Queue_threading_calls.1.zip kxroberto, 2006-03-22 10:43
Messages (4)
msg49763 - (view) Author: kxroberto (kxroberto) Date: 2006-03-20 11:46
Using bare Queue.Queue in an inter-process manner by
passing data is often tedious low-level style and
overkill and leads to non-cohesive style of coding.

Also threading up to now doesn't support a simply
framework for non-blocking call execution _with_
result/end - a frequent need in GUI programming and
easy load balancing for jerky resources.

The attachment contains 2 tools for that: CallQueue and
BackgroundCall. 

I think they fit well into the standard Python (2.5) lib.

The attachment is in the form of a standalone Python
module and can be tested directly, the 2 things can be
easily copied to the target modules Queue / threading.


Robert


PS: fast atomic list.append / list.pop(0) / obj.var=..
 assumed ; commented out use of Queue.Queue ;
threading/Queue should maybe last of all do paranoid
locking after all other stuff in the lib does so, in
case Python would really go towards CPU level
memory/time atoms, what in my opinion would destroy a
VHL language. In case, I missed something, Queue should
be uncommented.  of the bare list. (The tests in all my
apps raised no problems - I used that like tools since
years, just reshaped them a little for this posting)
msg49764 - (view) Author: kxroberto (kxroberto) Date: 2006-03-22 10:43
Logged In: YES 
user_id=972995

->attachment (new version and diff): an update which addes
options for exception handling (which I needed recently) and
resolves one bug.
msg49765 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2006-03-29 19:50
Logged In: YES 
user_id=341410

Place this in the Python cookbook over at activestate.com
and/or release it as a standalone module.

If it gets nontrivial community support, it may have a
chance at Python standard library inclusion.  As it stands,
it likely has exactly one user (you), no documentation, no
unittest test cases, and no chance of making it into the
standard library.

Suggested close of this patch.
msg49766 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-06 12:29
Rejecting as suggested.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43061
2006-03-20 11:46:29kxrobertocreate