labath wrote:

It looks like it's still flaky: 
https://lab.llvm.org/buildbot/#/builders/18/builds/11957

I think there's still at least one possible way this can race (return without 
reading all data):

1. read thread returns from the read call (reads some random data) and gets 
suspended
2. we begin shutting down: set the flag, and write the sentinel to the pipe
3. read thread wakes up, checks the flag and decides to exit (without reading 
our sentinel, or any other remaining data)

I think that one way to improve this would be to do a non-blocking read to 
drain the pipe before returning from the read thread.. which reminds me that I 
wanted to fix the problem which prevented you from using the Pipe class  ~~> 
#128719

https://github.com/llvm/llvm-project/pull/128583
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to