diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-06-12 00:27:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-06-14 23:43:13 +0200 |
| commit | a12a943c99ba4aba122f91c93b078d2e87146b32 (patch) | |
| tree | 93e149bc2d6f9c2ff98aa05c5d51e096dd0c6598 /src/lib/film.cc | |
| parent | 6d2d4973ccd5d4c78414d28988a74dfa7287f001 (diff) | |
Use a new UISignal which checks thread safety slightly.3052-hang
This adds a wrapper around signals2::signal which checks that emission
happens from the GUI thread, for signals whose handlers must be called
in the UI thread. I'm not sure how helpful it really is but maybe it
catches some bad situations.
Diffstat (limited to 'src/lib/film.cc')
| -rw-r--r-- | src/lib/film.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 09378696e..d7cb05930 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1310,7 +1310,7 @@ Film::signal_change(ChangeType type, FilmProperty p) if (type == ChangeType::DONE) { set_dirty(true); - emit(boost::bind(boost::ref(Change), type, p)); + Change.emit_ui(this, type, p); if (p == FilmProperty::VIDEO_FRAME_RATE || p == FilmProperty::SEQUENCE) { /* We want to call Playlist::maybe_sequence but this must happen after the @@ -1577,7 +1577,7 @@ Film::playlist_content_change(ChangeType type, weak_ptr<Content> c, int p, bool } if (type == ChangeType::DONE) { - emit(boost::bind(boost::ref(ContentChange), type, c, p, frequent)); + ContentChange.emit_ui(this, type, c, p, frequent); if (!frequent) { check_settings_consistency(); } @@ -2325,7 +2325,7 @@ Film::set_dirty(bool dirty) auto const changed = dirty != _dirty; _dirty = dirty; if (changed) { - emit(boost::bind(boost::ref(DirtyChange), _dirty)); + DirtyChange.emit_ui(this, _dirty); } } |
