[all-commits] [llvm/llvm-project] 55068d: [lldb] Add timed callbacks to the MainLoop class (...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Mon Nov 18 23:38:12 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 55068dc3b7725f24de82dd4510162865c91a4f5e
https://github.com/llvm/llvm-project/commit/55068dc3b7725f24de82dd4510162865c91a4f5e
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-11-19 (Tue, 19 Nov 2024)
Changed paths:
M lldb/include/lldb/Host/MainLoopBase.h
M lldb/include/lldb/Host/posix/MainLoopPosix.h
M lldb/include/lldb/Host/windows/MainLoopWindows.h
M lldb/source/Host/common/MainLoopBase.cpp
M lldb/source/Host/posix/MainLoopPosix.cpp
M lldb/source/Host/windows/MainLoopWindows.cpp
M lldb/unittests/Host/MainLoopTest.cpp
Log Message:
-----------
[lldb] Add timed callbacks to the MainLoop class (#112895)
The motivating use case is being able to "time out" certain operations
(by adding a timed callback which will force the termination of the
loop), but the design is flexible enough to accomodate other use cases
as well (e.g. running a periodic task in the background).
The implementation builds on the existing "pending callback" mechanism,
by associating a time point with each callback -- every time the loop
wakes up, it runs all of the callbacks which are past their point, and
it also makes sure to sleep only until the next callback is scheduled to
run.
I've done some renaming as names like "TriggerPendingCallbacks" were no
longer accurate -- the function may no longer cause any callbacks to be
called (it may just cause the main loop thread to recalculate the time
it wants to sleep).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list