Hi Brian and Mark,

On Jul 16, 2008, at 1:03 AM, Brian Aker wrote:

So to me these need to be set:
   error= setsockopt(ptr->fd, SOL_SOCKET, SO_LINGER,
                     &linger, (socklen_t)sizeof(struct linger));
   error= setsockopt(ptr->fd, SOL_SOCKET, SO_SNDTIMEO,
                     &waittime, (socklen_t)sizeof(struct timeval));
   error= setsockopt(ptr->fd, SOL_SOCKET, SO_RCVTIMEO,
                     &waittime, (socklen_t)sizeof(struct timeval));
   (void)fcntl(ptr->fd, F_SETFL, flags | O_NONBLOCK);

What I don't quite understand is, why use non-blocking I/O?

This would be like polling the connection. But after setting a timeout you shouldn't need to poll.

Another thing:

Have you considered using c10k and a pool of threads?

(although a THD would still be associated with a particular connection)

I have heard of patches for MySQL that do this, but supporting both methods just makes things complex.

So what is the best method in your opinion?

Regards,

Paul


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to