Yes, on_read is the read callback passed to uv_read_start and
after_work_cb is passed to uv_queue_work.
on_keystroke is callback passed to uv_read again but for tty stream.


I see.

Sorry I do not have libuv only code at the moment, but it is simple tcp
server on Windows.
It reads input data (predefined size) from socket and to process that
data it fires fixed number of threads using uv_queue_work.


uv_queue_work is an opaque thread pool, what do you mean by "fixed number of threads"? On Windows it uses QueueUserWorkItem http://msdn.microsoft.com/en-us/library/windows/desktop/ms684957(v=vs.85).aspx so I guess it could take a while to execute if you saturate it. But I'm just guessing here.

Side question: why do you process the data in a different thread? What kind of processing are you doing?

Now when I connect to this server using simulator (which simulates
thousand connections) and send loads of *asynchronous* data to server,
sometimes only on_read gets fired continuously for long time despite
worker threads are done with processing for quite a time back,
I do not get after_work_cb for any of them, neither do I get tty
callback even after keyboard input.


As for not getting the TTY callbacks, I don't really know why, sorry.


Regards,

--
Saúl Ibarra Corretgé
http://bettercallsaghul.com

--
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/groups/opt_out.

Reply via email to