4 ms·
Why would a DB driver need to integrate with libuv in the first place?
by eknkc 12y ago
Why would a DB driver need to integrate with libuv in the first place?
- coldtea 12y agoTo be evented and get the respective performance gains in a Node setting?
- paraboul 12y agoIn the case where the driver (for instance the official libmysql) doesn't expose its network interface (e.g. its sockets can't be used with an external event loop). In that case, it would block on IO operation, and there is no other choice but to push it to another thread. That said, using a driver in another thread leads to various complexities that can be avoided when running in the same application (javascript/v8) thread/event loop.