diff options
author | Greg Clayton <gclayton@apple.com> | 2012-01-31 04:56:17 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-01-31 04:56:17 +0000 |
commit | 74d4193e2fdc78bfe1e10d3f105189021a44da2d (patch) | |
tree | 64818169df7e87981f8817544bdd3163b0e97800 /lldb/source/Core/Communication.cpp | |
parent | 9e4b8726f85e7bb9e83560cdd6d7e8ef4eb198dc (diff) | |
download | bcm5719-llvm-74d4193e2fdc78bfe1e10d3f105189021a44da2d.tar.gz bcm5719-llvm-74d4193e2fdc78bfe1e10d3f105189021a44da2d.zip |
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
Diffstat (limited to 'lldb/source/Core/Communication.cpp')
-rw-r--r-- | lldb/source/Core/Communication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |