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
described (
http://docs.libuv.org/en/v1.x/design.html), 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:
```
libuv_ttyinlineread.c:38:main(server started!)
I type this line
libuv_ttyinlineread.c:14:on_alloc(size=65536)
libuv_ttyinlineread.c:9:on_read(nread=17)
```
But on Windows 10, I get this:
```
libuv_ttyinlineread.c:14:on_alloc(size=8192)
Assertion failed: handle->data, file libuv_ttyinlineread.c, line 15
```
Thanks in advance.
--
Renato Maia