Use Timeout<> in the Listener class
authorPavel Labath <labath@google.com>
Wed, 30 Nov 2016 10:41:42 +0000 (10:41 +0000)
committerPavel Labath <labath@google.com>
Wed, 30 Nov 2016 10:41:42 +0000 (10:41 +0000)
commitd35031e1e5b1dbe31f960a1054f139f7ba2c3f35
treee87ecf0672e25507d124b671ba079e9efa5bfc62
parent6d2497d48f332888a0d6d0d3e4766396822acb0e
Use Timeout<> in the Listener class

Summary:
Communication classes use the Timeout<> class to specify the timeout. Listener
class was converted to chrono some time ago, but it used a different meaning for
a timeout of zero (Listener: infinite wait, Communication: no wait). Instead,
Listener provided separate functions which performed a non-blocking event read.

This converts the Listener class to the new Timeout class, to improve
consistency. It also allows us to get merge the different GetNextEvent*** and
WaitForEvent*** functions into one. No functional change intended.

Reviewers: jingham, clayborg, zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D27136

llvm-svn: 288238
12 files changed:
lldb/include/lldb/Core/Listener.h
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBListener.cpp
lldb/source/Core/Communication.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Core/Listener.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Target/Process.cpp
lldb/unittests/Core/BroadcasterTest.cpp
lldb/unittests/Core/ListenerTest.cpp
lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp