問題タブ [qmutex]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - クラスに QMutex を追加した後、「削除された関数を参照しようとしています」
Qt5 でアプリケーションを作成しています。プログラムは正常にビルドおよび実行されますが、データ構造にアクセスする 2 つのスレッド間で競合が発生します。CanMessage オブジェクトの QList があり、QMutex を使用してその中のデータを保護したいと考えています。ただし、QMutex をクラス定義に追加するとすぐにエラーが発生します。
これが私のcanmessage.h
ファイルです:
そしてcansignal.h
: