In libuv v1.x (963ecc82) in Windows 10, I noticed that 'uv_read_start'
over a 'uv_tty_t' calls the 'uv_alloc_cb' before it returns. The same
does not seem to happen in Linux, nor even in Windows if we use other
'uv_tcp_t' ir 'uv_pipe_t'. Is this expected?
It was a problem for me because my code only sets up the environment
for the callback if 'uv_read_start' returns successfully (err >= 0).
Also, from the way the general design of the event loop of libuv is
), I was surprised
that callbacks can be invoked inside an API call.
I attached a small example to reproduce this scenario. On Linux, it
works as expected:
I type this line
But on Windows 10, I get this:
Assertion failed: handle->data, file libuv_ttyinlineread.c, line 15
Thanks in advance.