Regarding:

> That's the magic! ;-) The driver author uses LibUv indirectly.


And that emphatically does NOT use threads in this case.

Yes, you are right, so I said "uses LibUv indirectly", without adding "with
threads", now.

Only for complete the topic, I also mentioned require('fs'). I'm not sure
the scope of the use of threads in filesystem, but AFAIK (in Windows?) lib
uv could use a pool of thread for some operations that are not easily
mapped to async IO in host operating system

I don't know the current state of the art, but:

http://stackoverflow.com/questions/20032078/libuv-uses-blocking-file-system-calls-internally-why-how

Back to original question, all the magic goes to libuv, without the need of
blocking js thread. And it was mentioned the need of many sockets (then
connection pool) in case the server doesn't allow the use of the same one
for multiple operations.

Angel "Java" Lopez
@ajlopez




On Thu, Feb 27, 2014 at 11:53 AM, Matt <[email protected]> wrote:

>
> On Wed, Feb 26, 2014 at 2:50 PM, Angel Java Lopez 
> <[email protected]>wrote:
>
>> I just found:
>>
>> https://github.com/felixge/node-mysql
>>
>> It manage a pool:
>> https://github.com/felixge/node-mysql/blob/master/lib/Pool.js
>> A pool manage a list of available Connection
>> https://github.com/felixge/node-mysql/blob/master/lib/Connection.js
>> and connection use require('net')
>>
>> That's the magic! ;-) The driver author uses LibUv indirectly.
>>
>
> And that emphatically does NOT use threads in this case.
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to