Depending on your database, perhaps asynchronous query/response mechanisms? I know PostgreSQL has "asynchronous command processing." I would imagine quite a few databases libraries have something similar.
-Joe On Mar 25, 2014, at 12:54 PM, Ashish <[email protected]> wrote: > > > On Tuesday, March 25, 2014 4:53:09 PM UTC+5:30, Saúl Ibarra Corretgé wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > > >> Yes, I use uv_queue_work. I'll check with resources you've given. > >> Many thanks :) But meanwhile any quick clue to get around this > >> problem? > > > > I don't think using uv_queue_work (in its current state) is a good > idea. The threadpool just has 4 threads, and all file operations and > getaddrinfo run there, so you'll saturate it pretty quickly. > > What processing do you do, which requires you to process it on a > different thread? > > > > To process incoming requests I fire few DB queries and finally I send back > response from 'after_thread' callback. Since its time consuming operation > I've I threaded it off. > (For some requests, I also call uv_async_send through thread to send some > intermittent updates to requester client) > > If not uv_queue_work what are better options for me, please? > > Tnx, > Ashish > > > > - -- > Saúl Ibarra Corretgé > bettercallsaghul.com > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > Comment: Using GnuPG with Icedove - http://www.enigmail.net/ > > iQIcBAEBAgAGBQJTMWcdAAoJEEEOVVOum8BZWRYQAIN4g/BJGJYqGrzPU7B63XUt > mIlkiAp2DLCFEiyjA4VdLHM/xmtNFWurxhSayOnvsGxk+4mhBc8xI+AxijMOPulp > RVz7r3bfzTGCcj9dKh2y4f+GbqNkWhJpLqYLbCzPr/ojMYV0zISlxNi4Goylz19C > 6mXqFxm7upD6yINRL0RuUGgEqyZSMgzsf96q+7TuboAa5TxDduEFvKxflgSHyAI1 > +M2WN7iJLBVtRFGj0k69PxMnJBOmKpDu8mTQp/5fVLriTGvjMRM+XAoQiZMQVksq > CxWQYD6x4x9B1/KJaSGlipEsRSedvtcW+iXYDU/eOHa5xnvcDPOJNcDWwsoPNBT9 > +kMxLU49m8wQG2lT52GwwzCrRc1Iq61IArsiMFNa+5/kPOHJCwSmLtL1AYbVHeAC > wyIYJvTP8ODtOsJi06aPf/LfHBvf1LD+UYUGH+ohzYf+Z9AdLBe5IV3a5ULid1zR > GZaSbfo/Wnn0C4IJOjwbamhx5q0ysALPuq1xwTvQYdx7JVn8ArxghbBQdMUSflTP > xmg31W6Ye3HALWg8I8Z5xVkGIXkUIDseP50EgGLyHbg4wQMc/Uf49LDXHsuIGJnM > qYMZf9qGjvpdlA5zwCTvYDAcft2i51x6eaZDjG62hzn5+IR3ZKMJhcsHfgA110jm > DJct0tclVMzDv2qsxzvq > =/jcG > -----END PGP SIGNATURE----- > > -- > You received this message because you are subscribed to the Google Groups > "libuv" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/libuv. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
