• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wirenboard / wb-mqtt-w1 / 2

31 Jul 2026 09:52AM UTC coverage: 61.341% (+2.2%) from 59.111%
2

Pull #36

github

450382
ekateluv
Add missing cstdint include in test/utils.h

clang-tidy 22 in the updated devenv image no longer gets uint8_t
transitively from other standard headers.
Pull Request #36: Use exported vars instead of MAKEFLAGS for coverage options

172 of 248 branches covered (69.35%)

311 of 507 relevant lines covered (61.34%)

9.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.67
/threaded_runner.cpp
1
#include "threaded_runner.h"
2

3
#include <algorithm>
4
#include <wblib/utils.h>
5

6
using namespace std;
7
using namespace WBMQTT;
8

9
IPeriodicalWorker::~IPeriodicalWorker()
12✔
10
{}
12✔
11

12
TThreadedPeriodicalRunner::TThreadedPeriodicalRunner(unique_ptr<IPeriodicalWorker> worker,
×
13
                                                     std::chrono::milliseconds pollInterval,
14
                                                     const string& threadName,
15
                                                     TLogger& logger)
×
16
    : Worker(move(worker)),
×
17
      Active(false)
×
18
{
19
    if (pollInterval.count() < 1) {
×
20
        throw invalid_argument("polling intervall must be greater than zero");
×
21
    }
22

23
    Active = true;
×
24
    WorkerThread = MakeThread(threadName, {[this, pollInterval, threadName, &logger] {
×
25
                                  logger.Log() << threadName << " Started";
×
26

27
                                  while (1) {
28
                                      Worker->RunIteration();
×
29

30
                                      unique_lock<mutex> lk(ActiveMutex);
×
31
                                      if (ActiveCV.wait_for(lk, pollInterval, [&] { return !Active; })) {
×
32
                                          break;
×
33
                                      }
34
                                  }
×
35
                                  logger.Log() << threadName << " Stopped";
×
36
                              }});
×
37
}
×
38

39
TThreadedPeriodicalRunner::~TThreadedPeriodicalRunner()
×
40
{
41
    {
42
        lock_guard<mutex> lock(ActiveMutex);
×
43
        if (!Active) {
×
44
            return;
×
45
        }
46
        Active = false;
×
47
    }
×
48
    ActiveCV.notify_one();
×
49

50
    if (WorkerThread->joinable()) {
×
51
        WorkerThread->join();
×
52
    }
53

54
    WorkerThread.reset();
×
55
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc