[issue3831] Multiprocessing: Expose underlying pipe in queues

2008-09-11 Thread Steve Smith

Steve Smith [EMAIL PROTECTED] added the comment:

Hi Jesse,

The use-case I had is mind is enabling asyncronous (i.e. select() style)
notification of data being available on the queue, which is more elegant
(and efficient) than polling with get().  Example code showing how this
works with GTK is available here:

http://haltcondition.net/?p=2319

I understand wanting to keep the API simple, however the underlying
posix-level file-descriptors for pipes and connections are already
exposed via fileno(); the actual API change would just be a matter of
changing '_reader' and '_writer' to 'reader' and 'writer' (implicitly
guaranteeing their consistency).

Would it help if I attached a patch showing the proposed change to the
module?  I realise the API is frozen now but it would be nice to have
this further down the line.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3831
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3831] Multiprocessing: Expose underlying pipe in queues

2008-09-10 Thread Steve Smith

New submission from Steve Smith [EMAIL PROTECTED]:

Both Connection and Pipe objects expose their underlying file
descriptors, which is useful for accessing them in an event-driven
manner.  However the higher-level Queue does not make the underlying
pipe available; to get at them you must access private member attributes
which is fragile.  It would be good to have a well-defined API for
accessing either the pipe objects or the underlying FDs.

--
components: Extension Modules
messages: 73001
nosy: TarkaSteve
severity: normal
status: open
title: Multiprocessing: Expose underlying pipe in queues
type: feature request
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3831
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com