Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
tuneit
Commits
10a03579
Commit
10a03579
authored
Jan 27, 2026
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
settings: add destroyed check in async callbacks
parent
cba5cfdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
base.py
src/settings/setting/base.py
+18
-0
No files found.
src/settings/setting/base.py
View file @
10a03579
...
...
@@ -172,6 +172,8 @@ class BaseSetting:
return
SearcherFactory
.
create
(
self
.
search_target
)
.
search
()
def
_on_success
(
result
):
if
self
.
_destroyed
:
return
self
.
map
=
result
self
.
_normalize_map
()
self
.
_map_ready
=
True
...
...
@@ -182,15 +184,21 @@ class BaseSetting:
return
self
.
_get_backend_range_sync
()
def
_on_success
(
result
):
if
self
.
_destroyed
:
return
self
.
map
=
self
.
_build_map_from_range
(
result
)
self
.
_normalize_map
()
self
.
_map_ready
=
True
self
.
_notify_map_updated
()
def
_on_error
(
exc
):
if
self
.
_destroyed
:
return
self
.
logger
.
error
(
f
"Map load failed for {self.name}: {exc}"
)
def
_on_done
():
if
self
.
_destroyed
:
return
self
.
_map_loading
=
False
self
.
_set_busy
(
False
)
...
...
@@ -218,13 +226,19 @@ class BaseSetting:
return
self
.
_get_backend_value_sync
()
def
_on_success
(
value
):
if
self
.
_destroyed
:
return
self
.
_current_value
=
value
self
.
_update_widget
()
def
_on_error
(
exc
):
if
self
.
_destroyed
:
return
self
.
logger
.
error
(
f
"Value load failed for {self.name}: {exc}"
)
def
_on_done
():
if
self
.
_destroyed
:
return
self
.
_value_loading
=
False
self
.
_set_busy
(
False
)
...
...
@@ -244,9 +258,13 @@ class BaseSetting:
return
self
.
_set_backend_value_sync
(
value
)
def
_on_error
(
exc
):
if
self
.
_destroyed
:
return
self
.
logger
.
error
(
f
"Value save failed for {self.name}: {exc}"
)
def
_on_done
():
if
self
.
_destroyed
:
return
self
.
_set_busy
(
False
)
self
.
_executor
.
submit
(
_save
,
on_error
=
_on_error
,
on_done
=
_on_done
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment