so that the thread is gone before the object is torn down.
AnalyseAudioJob::~AnalyseAudioJob ()
{
+ destroy_thread ();
BOOST_FOREACH (Filter const * i, _filters) {
delete const_cast<Filter*> (i);
}
}
+CheckContentChangeJob::~CheckContentChangeJob()
+{
+ destroy_thread ();
+}
+
string
CheckContentChangeJob::name () const
{
{
public:
CheckContentChangeJob (boost::shared_ptr<const Film>, boost::shared_ptr<Job> following = boost::shared_ptr<Job>());
+ ~CheckContentChangeJob ();
std::string name () const;
std::string json_name () const;
}
+ExamineContentJob::~ExamineContentJob ()
+{
+ destroy_thread ();
+}
+
string
ExamineContentJob::name () const
{
{
public:
ExamineContentJob (boost::shared_ptr<const Film>, boost::shared_ptr<Content>);
+ ~ExamineContentJob ();
std::string name () const;
std::string json_name () const;
}
+ExamineFFmpegSubtitlesJob::~ExamineFFmpegSubtitlesJob ()
+{
+ destroy_thread ();
+}
+
string
ExamineFFmpegSubtitlesJob::name () const
{
{
public:
ExamineFFmpegSubtitlesJob (boost::shared_ptr<const Film>, boost::shared_ptr<FFmpegContent>);
+ ~ExamineFFmpegSubtitlesJob ();
std::string name () const;
std::string json_name () const;
}
Job::~Job ()
+{
+#ifdef DCPOMATIC_DEBUG
+ /* Any subclass should have called destroy_thread in its destructor */
+ assert (!_thread);
+#endif
+}
+
+void
+Job::destroy_thread ()
{
if (_thread) {
_thread->interrupt ();
}
delete _thread;
+ _thread = 0;
}
/** Start the job in a separate thread, returning immediately */
void set_message (std::string m);
int elapsed_sub_time () const;
void check_for_interruption_or_pause ();
+ void destroy_thread ();
boost::shared_ptr<const Film> _film;
}
+SendKDMEmailJob::~SendKDMEmailJob ()
+{
+ destroy_thread ();
+}
+
string
SendKDMEmailJob::name () const
{
std::string cpl_name
);
+ ~SendKDMEmailJob ();
+
std::string name () const;
std::string json_name () const;
void run ();
}
+SendNotificationEmailJob::~SendNotificationEmailJob ()
+{
+ destroy_thread ();
+}
+
string
SendNotificationEmailJob::name () const
{
{
public:
explicit SendNotificationEmailJob (std::string body);
+ ~SendNotificationEmailJob ();
std::string name () const;
std::string json_name () const;
}
+SendProblemReportJob::~SendProblemReportJob ()
+{
+ destroy_thread ();
+}
+
string
SendProblemReportJob::name () const
{
std::string summary
);
+ ~SendProblemReportJob ();
+
std::string name () const;
std::string json_name () const;
void run ();
}
+TranscodeJob::~TranscodeJob ()
+{
+ destroy_thread ();
+}
+
string
TranscodeJob::name () const
{
{
public:
explicit TranscodeJob (boost::shared_ptr<const Film> film);
+ ~TranscodeJob ();
std::string name () const;
std::string json_name () const;
}
+UploadJob::~UploadJob ()
+{
+ destroy_thread ();
+}
+
string
UploadJob::name () const
{
{
public:
explicit UploadJob (boost::shared_ptr<const Film>);
+ ~UploadJob ();
std::string name () const;
std::string json_name () const;
}
+VerifyDCPJob::~VerifyDCPJob ()
+{
+ destroy_thread ();
+}
+
string
VerifyDCPJob::name () const
{
{
public:
explicit VerifyDCPJob (std::vector<boost::filesystem::path> directories);
+ ~VerifyDCPJob ();
std::string name () const;
std::string json_name () const;