[Lldb-commits] [PATCH] D132395: [lldb] [gdb-remote] Use Communication::WriteAll() over Write()
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 24 03:09:46 PDT 2022
labath added a comment.
> To be honest, I can't think of a real use case where aliasing Write() to WriteAll() would make a caller-visible difference.
If you mean, "in the lldb code base", then you might be right, but generally speaking, the difference is in the handling of interrupts and blocking operations. After a select, a single `write` call is guaranteed not to block (and to write something), but that's is not the case if you're going to be calling it in a loop. I don't know if we have any code like that for writes, but we do rely on this pattern for reads (although we might also make the FD non-blocking -- I don't remember).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132395/new/
https://reviews.llvm.org/D132395
More information about the lldb-commits
mailing list