diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-22 15:20:52 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-22 15:20:52 +0100 |
commit | 7de0f46028e964bd7b7979835ef0a80cf8cb01b7 (patch) | |
tree | 297ad74ff359a0b6975794e37c89764bd5ec5905 /cv/video-widget.hpp | |
parent | 388e9e57d8dcc1b5eda16670bae0e4518515504c (diff) |
video/widget: fix mutex starvation
Get rid of contention in `preview_size' and `set_image'.
After switching the Qt mutex to non-recursive, turns out the writer
thread preempts the UI thread to the point of freezing the entire thing.
Mutex fairness is an implementation detail and we must assume unfair
mutexes in the worst case.
Diffstat (limited to 'cv/video-widget.hpp')
-rw-r--r-- | cv/video-widget.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cv/video-widget.hpp b/cv/video-widget.hpp index 9d62f19e..54316d32 100644 --- a/cv/video-widget.hpp +++ b/cv/video-widget.hpp @@ -12,7 +12,7 @@ struct cv_video_widget final : video_widget { - cv_video_widget(QWidget* parent = nullptr); + using video_widget::video_widget; void update_image(const cv::Mat& frame); private: |