Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
kicad
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
KiCad
KiCad Source Code
kicad
Commits
4a54ea3b
Commit
4a54ea3b
authored
1 year ago
by
Mark Roszko
Browse files
Options
Downloads
Patches
Plain Diff
Try and fix multi-threading issues with the background job widgets
Fixes
#15377
parent
a6bceb81
No related branches found
No related tags found
No related merge requests found
Pipeline
#960630906
passed
1 year ago
Stage: build
Stage: test
Stage: report
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/background_jobs_monitor.cpp
+16
-6
16 additions, 6 deletions
common/background_jobs_monitor.cpp
with
16 additions
and
6 deletions
common/background_jobs_monitor.cpp
+
16
−
6
View file @
4a54ea3b
...
...
@@ -305,26 +305,36 @@ void BACKGROUND_JOBS_MONITOR::ShowList( wxWindow* aParent, wxPoint aPos )
void
BACKGROUND_JOBS_MONITOR
::
jobUpdated
(
BACKGROUND_JOB
*
aJob
)
{
//for now, we go and update the status bar if its the first job in the vector
// this method is called from the reporters from potentially other threads
// we have to guard ui calls with CallAfter
if
(
m_jobs
.
size
()
>
0
)
{
//for now, we go and update the status bar if its the first job in the vector
if
(
m_jobs
.
front
()
==
aJob
)
{
// update all status bar entries
for
(
KISTATUSBAR
*
statusBar
:
m_statusBars
)
{
statusBar
->
ShowBackgroundProgressBar
();
statusBar
->
SetBackgroundProgress
(
aJob
->
m_currentProgress
);
statusBar
->
SetBackgroundProgressMax
(
aJob
->
m_maxProgress
);
statusBar
->
SetBackgroundStatusText
(
aJob
->
m_status
);
statusBar
->
CallAfter
(
[
=
]()
{
statusBar
->
ShowBackgroundProgressBar
();
statusBar
->
SetBackgroundProgress
(
aJob
->
m_currentProgress
);
statusBar
->
SetBackgroundProgressMax
(
aJob
->
m_maxProgress
);
statusBar
->
SetBackgroundStatusText
(
aJob
->
m_status
);
}
);
}
}
}
for
(
BACKGROUND_JOB_LIST
*
list
:
m_shownDialogs
)
{
list
->
UpdateJob
(
aJob
);
list
->
CallAfter
(
[
=
]()
{
list
->
UpdateJob
(
aJob
);
}
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment