[Lldb-commits] [PATCH] D133181: [test] Ensure MainLoop has time to start listening for signals.
Jordan Rupprecht via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 2 07:53:18 PDT 2022
rupprecht updated this revision to Diff 457598.
rupprecht added a comment.
- Remove async call to avoid deadlock instead
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133181/new/
https://reviews.llvm.org/D133181
Files:
lldb/unittests/Host/MainLoopTest.cpp
Index: lldb/unittests/Host/MainLoopTest.cpp
===================================================================
--- lldb/unittests/Host/MainLoopTest.cpp
+++ lldb/unittests/Host/MainLoopTest.cpp
@@ -32,17 +32,13 @@
ASSERT_TRUE(error.Success());
Socket *accept_socket;
- std::future<Status> accept_error = std::async(std::launch::async, [&] {
- return listen_socket_up->Accept(accept_socket);
- });
-
std::unique_ptr<TCPSocket> connect_socket_up(
new TCPSocket(true, child_processes_inherit));
error = connect_socket_up->Connect(
llvm::formatv("localhost:{0}", listen_socket_up->GetLocalPortNumber())
.str());
ASSERT_TRUE(error.Success());
- ASSERT_TRUE(accept_error.get().Success());
+ ASSERT_TRUE(listen_socket_up->Accept(accept_socket).Success());
callback_count = 0;
socketpair[0] = std::move(connect_socket_up);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133181.457598.patch
Type: text/x-patch
Size: 902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220902/20574320/attachment.bin>
More information about the lldb-commits
mailing list