Btw, I'm pretty newbie to libuv, can you suggest a better way of doing what I'm trying to do? (Read user input from a background thread)
I'm using a pipe for reading backed by a static buffer, but I have to return buf->len == 1 to ensure libuv calls my read_cb everytime a new character is typed. Also, everything works perfectly if I set BUF_SIZE to 1(makes sense since libuv won't be polling when I call uv_async_send) Thanks On Wed, Mar 5, 2014 at 7:38 AM, Saúl Ibarra Corretgé <[email protected]> wrote: > On 03/05/2014 11:35 AM, Thiago Padilha wrote: >> >> On Wed, Mar 5, 2014 at 7:14 AM, Saúl Ibarra Corretgé <[email protected]> >> wrote: >>> >>> What do you mean by "won't work"? Is the async callback executed? If so, >>> libuv is executing that callback and not polling for i/o, and when >>> uv_stop >>> is called the next time a 0 timeout poll will be performed. >> >> >> The async callback is never called so the loop isn't stopped >> > > Hum, that's weird. I assume it was initialized, right? > > >>> Do you have a test case showing this behavior? By looking at the code I >>> don't see how this could happen. >> >> >> Yes, I've pushed a branch to github. If you are on a linux machine you >> can probably copy/paste these to setup everything(need cmake >> installed): >> >> git clone git://github.com/tarruda/neovim >> cd neovim >> git checkout uv_async_send-hang >> make cmake >> make >> >> The above should compile './build/bin/nvim'. To reproduce the problem >> enter the editor: >> >> ./build/bin/nvim -u NONE >> >> and quit it with ':q<enter>' >> >> You should see a message 'calling async uv_stop'. The relevant code is >> at src/os/io.c . >> > > I'll have a look! > > > > Cheers, > > -- > Saúl Ibarra Corretgé > 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. -- 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.
