Re: GPerlClosure and GIOChannel [patch and RFC]



On Saturday, August 9, 2003, at 07:28  PM, James Curbo wrote:

muppet wrote:
 > now, a new question is: should the GIOChannel be wrapped as a proper
perl file handle (and how would you do that?) or is it okay to leave it as a fileno? and even more important, am i correct that we can just ignore the GIOChannel at the perl level and use only the file descriptor? is there any GIOChannel functionality that perl doesn't already provide?

Well, personally, in the one program I have written in C using GIOChannels, I didn't use them for unified IO access, I used them because you have to integrate your IO source (for me, sockets) into the event loop somehow.

from what i can tell, that's really all they're good for.


In the Perl case, I think it would be pretty cool to have the channel wrapped as a proper file handle, so that you could use all your normal Perl operations (from inside your IO callback, I assume).

that would be pretty spiffy, but it's something that would have to change before 1.0, because i wouldn't want to change it after. (lots of code breakage issues.)

unfortunately, i'm not up on how to use PerlIO objects from xs, so i'm not sure how feasible it would be to tie together a file handle and a GIOChannel.... can somebody give me any pointers?


please try out the patch and let me know what you think.

I'll try and play around with it this weekend sometime.

i heard no complaints, so i just committed the patch.

as things are, there is no difference in behavior visible from perl --- I/O watch callbacks still get file descriptors like before.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]