Skip to content

Commit

Permalink
Use INDI:SingleThreadPool - Deadlock fix (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-soja committed Mar 22, 2021
1 parent 99ec370 commit a15898c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 79 deletions.
4 changes: 2 additions & 2 deletions indi-asi/asi_ccd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ bool ASICCD::activateCooler(bool enable)

bool ASICCD::StartExposure(float duration)
{
mWorker.run(std::bind(&ASICCD::workerExposure, this, std::placeholders::_1, duration));
mWorker.start(std::bind(&ASICCD::workerExposure, this, std::placeholders::_1, duration));
return true;
}

Expand Down Expand Up @@ -1034,7 +1034,7 @@ bool ASICCD::StartStreaming()
}
}
#endif
mWorker.run(std::bind(&ASICCD::workerStreamVideo, this, std::placeholders::_1));
mWorker.start(std::bind(&ASICCD::workerStreamVideo, this, std::placeholders::_1));
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions indi-asi/asi_ccd.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "indipropertyswitch.h"
#include "indipropertynumber.h"
#include "indipropertytext.h"
#include "singleworker_tmp.h"
#include "indisinglethreadpool.h"

#include <vector>

Expand Down Expand Up @@ -81,7 +81,7 @@ class ASICCD : public INDI::CCD
const char *getBayerString() const;

private:
Temporary::SingleWorker mWorker;
INDI::SingleThreadPool mWorker;
void workerStreamVideo(const std::atomic_bool &isAboutToQuit);
void workerBlinkExposure(const std::atomic_bool &isAboutToQuit, int blinks, float duration);
void workerExposure(const std::atomic_bool &isAboutToQuit, float duration);
Expand Down
75 changes: 0 additions & 75 deletions indi-asi/singleworker_tmp.h

This file was deleted.

0 comments on commit a15898c

Please sign in to comment.