id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
51,Should iochannel have on* callbacks?,scott,gt3,"== Research Task ==
It may be worthwhile to look into making iochannel's have a {{{onread}}}, 
{{{onwrite}}}, {{{onclose}}}, {{{onerror}}} type of events.  These events
would probably only be available after, though, an iochannel has been associated
with an eventloop.  This would create a syntax such as:

{{{
var loop = new EventLoop()
loop.watch(iochannel)
iochannel.onread = function () {
   print(this.read())
}
iochannel.onwrite = function () {
   this.write(pending_data.shift())
}
iochannel.onerror = function (error) {
   print(this + "" closed, due to "" + error)
}
/* etc... */
}}}

It promotes scope hacks, but that's ok because that promotes 
privacy.  This also may be less work to code up than introducing the
entire glib event source API, source objects, and so on.",task,new,major,Sagot 0.1,IMGV,,,,
