mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-18 17:12:54 +00:00
LibThreading: Add ability to cancel ongoing BackgroundActions
Handlers of the BackgroundAction are responsible for checking if the action has been cancelled and returning early.
This commit is contained in:
parent
4a3958c8ae
commit
00f93b2545
Notes:
sideshowbarker
2024-07-18 11:07:22 +09:00
Author: https://github.com/SpencerCDixon
Commit: 00f93b2545
Pull-request: https://github.com/SerenityOS/serenity/pull/8389
4 changed files with 18 additions and 7 deletions
|
@ -61,7 +61,7 @@ private:
|
|||
void ThreadStackWidget::refresh()
|
||||
{
|
||||
Threading::BackgroundAction<Vector<Symbolication::Symbol>>::create(
|
||||
[pid = m_pid, tid = m_tid] {
|
||||
[pid = m_pid, tid = m_tid](auto&) {
|
||||
return Symbolication::symbolicate_thread(pid, tid);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue