enh(Poco::ActiveThreadPool): make it easy to use correctly#4624
enh(Poco::ActiveThreadPool): make it easy to use correctly#4624matejk merged 26 commits intopocoproject:mainfrom siren186:main
Conversation
|
@siren186 , can you write a test that verifies the changes? |
…h arrived via a may be assigned to a non-local variable.
|
@siren186, Thank you for updating the code. Some compile and testrun actions fail. |
…ier macOS versions
… on earlier macOS versions" This reverts commit cba4673.
… support for C++17
|
@siren186 , I found out that increasing the macOS target version is better than not using optional. Two changes are committed to a related branch in Poco repository. Would you merge those two commits? |
|
@matejk Is this check action error caused by my PR ? |
|
I don't think so. I started the job again. |
|
@siren186 , @matejk
First test verifies that we can run more async events than threads in the pool. My test returns OK in booth realisations, but my realisation is 2 times faster ./Foundation-testrunner testAsyncNotifyBenchmark
testAsyncNotifyBenchmark: Total async events is 10000000
total wait time is 107072ms (avg notify-time per run is 107.072ms)
OK (1 tests)my PR ./Foundation-testrunner testAsyncNotifyBenchmark
testAsyncNotifyBenchmark: Total async events is 10000000
total wait time is 58783ms (avg notify-time per run is 58.783ms)
OK (1 tests)Second test verifies that long tasks and short tasks distributes between threads and we have a garantee that short task don't wait long task if theris a free thread. My realisation returns OK, but this realisation failed this PR time ./Foundation-testrunner testActiveThreadLoadBalancing
testActiveThreadLoadBalancing: FAILURE
!!!FAILURES!!!
Runs: 1 Failures: 1 Errors: 0
There was 1 failure:
1: CppUnit::TestCaller<ActiveThreadPoolTest>.testActiveThreadLoadBalancing
"lttPerTIDCount != 0"
in "/Users/a.bychuk/coding/pet/poco/Foundation/testsuite/src/ActiveThreadPoolTest.cpp", line 130
./Foundation-testrunner testActiveThreadLoadBalancing 0.09s user 0.02s system 0% cpu 12.049 totalmy PR time ./Foundation-testrunner testActiveThreadLoadBalancing
testActiveThreadLoadBalancing:
OK (1 tests)
./Foundation-testrunner testActiveThreadLoadBalancing 0.08s user 0.02s system 0% cpu 21.696 total |
Poco::Threadobjects.