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

polserver / polserver / 29352231943

14 Jul 2026 05:04PM UTC coverage: 61.419% (+0.07%) from 61.349%
29352231943

push

github

web-flow
Misc modernizations and improvments (#896)

* fixed_allocator cleanup
template argument is now the type and not the size
general cleanup, rewrote refill loop to better understand whats
happening
possibility to use different alignments (not needed for the used types)

* adapted fixed_allocator usage

* simplified message_queue conditial wait, removed unused header

* use moveonlyfunction for logging queue

* cleanup and performance improvment for clienttransmit

* use moveonlyfunction for sql

* fixed use after move

* TaskThreadPool uses moveonlyfunction

* catch exception locally without stopping the complete workerthread

* message_queue pop with timeout

* DynTaskThreadPool changes

- using move_only_function
- general simplification
- minimum of 4 threads
- added idle timeout to get rid of workers

* simplified auxpoolthread usage

* fixed threadmap initialization

* to avoid static initialization problem dont prefill worker threada in
the constructor
update macos to latest which hopefully supports jthreads

* removed debug logs

* seems macos-latest is not always 26, explicitly use it

* added jitter for timeout
secured the logic when to spawn a new thread more
busyguard is now used to track a message compare value against
live_threads to decide if a new thread should be spawned
unique name per poolworker

199 of 248 new or added lines in 15 files covered. (80.24%)

1 existing line in 1 file now uncovered.

45056 of 73359 relevant lines covered (61.42%)

634055.61 hits per line

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

90.48
/pol-core/pol/testing/testthreadpool.cpp
1

2
#include "testenv.h"
3

4
#include "clib/threadhelp.h"
5
#include <thread>
6

7
namespace Pol::Testing
8
{
9
void dynthreadpool_test()
1✔
10
{
11
  threadhelp::DynTaskThreadPool pool{ "test" };
1✔
12

13
  UnitTest( [&]() { return pool.threadpoolsize(); }, 0u, "init" );
2✔
14
  UnitTest( [&]() { return pool.checked_push( [] { return true; } ).get(); }, true, "first work" );
3✔
15
  UnitTest( [&]() { return pool.threadpoolsize(); }, 1u, "pool size after first run" );
2✔
16
  UnitTest(
1✔
17
      [&]()
1✔
18
      {
19
        try
20
        {
21
          pool.checked_push( [] { throw std::exception(); } ).get();
4✔
22
        }
23
        catch ( std::exception& )
1✔
24
        {
25
          return true;
1✔
26
        }
1✔
NEW
27
        return false;
×
28
      },
29
      true, "exception in checked push" );
30
  UnitTest(
1✔
31
      [&]()
1✔
32
      {
33
        pool.push(
1✔
NEW
34
            []
×
35
            {
36
              INFO_PRINTLN( "throw" );
1✔
37
              throw std::exception();
1✔
38
            } );
39
        return true;
1✔
40
      },
41
      true, "exception in push" );
42
  UnitTest( [&]() { return pool.checked_push( [] { return true; } ).get(); }, true,
3✔
43
            "would block endless if worker died before" );
44
}
1✔
45

46
}  // namespace Pol::Testing
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