On Jul 17, 2008, at 2:35 PM, Brian Aker wrote:


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.

Much cheaper though then the current method. Let me describe more detail...

Another thing:

Have you considered using c10k and a pool of threads?


Notice that in Drizzle, we only work with pool of threads.

I have tree for this, but it is now out of date, but this was the plan...

Pool of threads (done).
Change main select to be libevent (done in different tree).
Executue on read events. If we ever get a zero read on a non-block call (everything is non-block) we yield after N events and wait till we get sliced back in. This would be done on read/writes (though just read first).

Thoughts?

OK, I see. Because libevent has already detected that data is available, the thread does a "busy" read.

Is this faster than doing a blocking read?


_______________________________________________
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