New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] possible rstream simplification #980
Comments
I added this guard is because @saghul mentioned(or I misunderstood) that sequential calls to |
Do you remember where he said it? I'd like to know for sure too. |
Not for the same stream, just for different streams. |
Perfect, then we can remove a couple of lines. I'll do it in my PR close to the commit that increases the buffer size. (and thanks @saghul!) |
Not necessary, as discussed in neovim#980. Closes neovim#980.
Not necessary, as discussed in neovim#980. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
Not necessary, as discussed in neovim#980. From the libuv mailing list: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQ E.g. this could happen (red: on Windows): > > alloc_cb(handle1); > > alloc_cb(handle2); > > read_cb(handle1); > > read_cb(handle2); But this couldn't: > > alloc_cb(handle1); > > alloc_cb(handle1); > > read_cb(handle1); > > read_cb(handle1); Because each stream has a 1-to-1 correspondance with a libuv handle. The code removed was never executed. Closes neovim#980.
@tarruda some time ago I asked a question about the possibility of
alloc_cb(); alloc_cb(); read_cb(); read_cb()
occurring on Windows: https://groups.google.com/forum/#!topic/libuv/OD38PeGeVgQThis answer is enlightening:
While reading
rstreamc.
, I see:It seems like the
rstream->reading
thing is not necessary, even on Windows. The reason being that each stream has a 1-to-1 correspondance with a libuv handle, andalloc_cb(handle1); alloc_cb(handle1);
can never happen.There would be a problem if we were reusing the same
rstream->buffer
for all streams though. As far as I can see, we don't though.The text was updated successfully, but these errors were encountered: