You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 4, 2018. It is now read-only.
Hello! When I was debugging Rust, I found uv_read_start may not call read_cb in some cases. Since Rust's I/O currently utilizes callback for scheduling, it is critical to know whether read_cb is called by uv or not.
Initially I guessed that the return value from uv_read_start indicates whether read_cb is called or not. However, it is not true on win32: it returns zero for tty if it has UV_HANDLE_READ_PENDING flag.
So I now think: return value only means that there was no critical error, not necessarily that read_cb has been called. Is it right? Then I'm also curious if there is a way to know it.
The text was updated successfully, but these errors were encountered:
So I now think: return value only means that there was no critical error, not necessarily that read_cb has been called. Is it right?
That's correct. uv_read_start() merely tells libuv to start listening for incoming data. If or when your callback is invoked is indeterminate but it will be at least one event loop tick in the future. Does that answer your question?
Hello! When I was debugging Rust, I found
uv_read_start
may not callread_cb
in some cases. Since Rust's I/O currently utilizes callback for scheduling, it is critical to know whetherread_cb
is called by uv or not.Initially I guessed that the return value from
uv_read_start
indicates whetherread_cb
is called or not. However, it is not true on win32: it returns zero for tty if it hasUV_HANDLE_READ_PENDING
flag.So I now think: return value only means that there was no critical error, not necessarily that
read_cb
has been called. Is it right? Then I'm also curious if there is a way to know it.The text was updated successfully, but these errors were encountered: