> > In terms of why I'm banging on about file descriptors, let me explain > my itch. I work on very highly scalable network applications that > process thousands of concurrent connections. In these > programs NOTHING > can block my event loop, because everything falls apart if I > do. And I > have to be very careful about slow system calls. If I can have a file > descriptor it can fit in cleanly with my current event loop. If I > can't, and have to rely on something like $sth->ready, which > might call > its own select() function, then I'm screwed, because select() > is a slow > system call.
Just to be clear and not that I think DBI is going down the path of implementing select(), but since it's mentioned and since I've recently (today) been screwed by it, I'll bring it up. You have to be careful with select() and portability. Not all fds are the same on all platforms. For example, Win32 select() doesn't work with file handles, but it does with sockets. (At least as of 5.8.4). Regards, Jeff