As some of you may know I have written a tube module where
a tube is a queue like object but can be registered like
a pipe or socket id. 

The only thing that bugs me a little is that it doesn't
return a integer ID, so you can't remove the tube watcher
with gobject.source_remove

So what I was wondering is, if it would be possible to
provide in a function that could help. I was thinking
about the following.

  def request_source(cleanup, ...):

This would return an integer ID, similar to what is returned
by idle_add and io_add_watch. When this ID is used as an
argument to gobject.source_remove, then cleanup is called
with args provided.

When a tube is registered I could request such a source
with as cleanup a method to remove the callback and
I could then return the ID.

Is there a possiblity for this?

-- 
Antoon Pardon
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to