From 74d4193e2fdc78bfe1e10d3f105189021a44da2d Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 31 Jan 2012 04:56:17 +0000 Subject: Cleaned up the Communication class when it tears down ConnectionFileDescriptor instances to not pthread_cancel the read threads and wreak havoc on the mutex in our ConnectionFileDescriptor class. Also cleaned up some shutdown delays. llvm-svn: 149355 --- lldb/source/Core/Communication.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/Core/Communication.cpp') diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index a9ca35c9db8..45850f3858b 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -65,8 +65,8 @@ void Communication::Clear() { SetReadThreadBytesReceivedCallback (NULL, NULL); - StopReadThread (NULL); Disconnect (NULL); + StopReadThread (NULL); } ConnectionStatus @@ -253,7 +253,7 @@ Communication::StopReadThread (Error *error_ptr) BroadcastEvent (eBroadcastBitReadThreadShouldExit, NULL); - Host::ThreadCancel (m_read_thread, error_ptr); + //Host::ThreadCancel (m_read_thread, error_ptr); bool status = Host::ThreadJoin (m_read_thread, NULL, error_ptr); m_read_thread = LLDB_INVALID_HOST_THREAD; @@ -383,7 +383,7 @@ Communication::ReadThread (void *p) // Let clients know that this thread is exiting comm->BroadcastEvent (eBroadcastBitReadThreadDidExit); comm->m_read_thread_enabled = false; - comm->Disconnect(); + comm->m_read_thread = LLDB_INVALID_HOST_THREAD; return NULL; } @@ -401,8 +401,8 @@ Communication::SetReadThreadBytesReceivedCallback void Communication::SetConnection (Connection *connection) { - StopReadThread(NULL); Disconnect (NULL); + StopReadThread(NULL); m_connection_sp.reset(connection); } -- cgit v1.2.3