Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Thread Pool #25

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

New Thread Pool #25

wants to merge 2 commits into from

Conversation

jparisu
Copy link
Contributor

@jparisu jparisu commented Nov 23, 2022

After PR: #24

This is the refactor of PR: eProsima/DDS-Router#304

@jparisu jparisu temporarily deployed to codecov November 23, 2022 12:22 Inactive
@jparisu jparisu temporarily deployed to codecov November 23, 2022 12:22 Inactive
@codecov-commenter
Copy link

Codecov Report

Base: 69.90% // Head: 69.88% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (f447332) compared to base (e913acb).
Patch coverage: 63.46% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   69.90%   69.88%   -0.03%     
==========================================
  Files          44       59      +15     
  Lines         771      870      +99     
  Branches      182      224      +42     
==========================================
+ Hits          539      608      +69     
+ Misses        135      130       -5     
- Partials       97      132      +35     
Impacted Files Coverage Δ
...ils/include/cpp_utils/wait/ConsumerWaitHandler.hpp 0.00% <ø> (ø)
...include/cpp_utils/wait/impl/DBQueueWaitHandler.ipp 35.71% <0.00%> (-8.74%) ⬇️
...include/cpp_utils/threading/task/ArgsOwnedTask.hpp 50.00% <50.00%> (ø)
...nclude/cpp_utils/wait/impl/ConsumerWaitHandler.ipp 75.00% <50.00%> (-9.22%) ⬇️
...p_utils/src/cpp/threading/manager/AsyncManager.cpp 50.00% <50.00%> (ø)
..._utils/src/cpp/threading/manager/StdThreadPool.cpp 50.00% <50.00%> (ø)
cpp_utils/src/cpp/threading/task/ReferenceTask.cpp 66.66% <66.66%> (ø)
...tils/threading/connector/impl/OneShotConnector.ipp 71.42% <71.42%> (ø)
...de/cpp_utils/threading/task/impl/ArgsOwnedTask.ipp 83.33% <83.33%> (ø)
cpp_utils/src/cpp/threading/task/OwnedTask.cpp 83.33% <83.33%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jparisu jparisu temporarily deployed to codecov December 1, 2022 08:12 Inactive
@jparisu jparisu temporarily deployed to codecov December 1, 2022 08:12 Inactive
@jparisu jparisu marked this pull request as draft December 1, 2022 09:58
@jparisu
Copy link
Contributor Author

jparisu commented Dec 1, 2022

Windows issues:

  • Timeout. The RESIDUAL_TIME_TEST is too low for windows

TSAN issues:
There is an issue when using ThreadPool as every object sent in a Task must be forced to live longer than the task. If not, TSAN reports an error (even when user takes care of avoiding the error by synchronizing threads).
Thus, there are 2 possibilities:

  • Everything that goes in a Task must be shared, unique or copied. Not reference or pointers are allowed.
  • Synchronization method between ThreadPool and caller that announce when a task has finished.

We decided to implement the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants