Skip to content

feat(internal): thread pool - #1883

Open
jpnurmi wants to merge 15 commits into
masterfrom
jpnurmi/perf/thread-pool
Open

feat(internal): thread pool#1883
jpnurmi wants to merge 15 commits into
masterfrom
jpnurmi/perf/thread-pool

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Introduce a generic thread pool that runs tasks in parallel in a predetermined number of pooled threads and invokes completion callbacks in submission order. The primary use case is the telemetry serialization pool coming in #1946, but it could be used for offloading other heavy tasks, too.

#skip-changelog (internal)

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e5f725b

Comment thread src/sentry_telemetry.c
Comment thread src/sentry_batcher.c Outdated
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.06375% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.07%. Comparing base (55059e4) to head (e5f725b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1883      +/-   ##
==========================================
+ Coverage   75.94%   76.07%   +0.12%     
==========================================
  Files          94       94              
  Lines       22161    22417     +256     
  Branches     3936     4013      +77     
==========================================
+ Hits        16831    17053     +222     
- Misses       4444     4468      +24     
- Partials      886      896      +10     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from 2996a56 to ec39dc8 Compare July 22, 2026 14:55
Comment thread src/backends/sentry_backend_inproc.c
Comment thread src/sentry_batcher.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from ec39dc8 to 829189b Compare July 22, 2026 15:14
Comment thread src/backends/sentry_backend_breakpad.cpp
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from 829189b to 406b054 Compare July 22, 2026 15:47
Comment thread src/sentry_batcher.c Outdated
Comment thread src/sentry_telemetry.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from 406b054 to 03159d6 Compare July 22, 2026 16:02
Comment thread src/sentry_batcher.c Outdated
Comment thread src/sentry_batcher.c Outdated
Comment thread src/sentry_transport.c
Comment thread src/sentry_telemetry.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from e417bed to 12f4872 Compare July 24, 2026 10:19
Comment thread src/sentry_telemetry.c Outdated
Comment thread src/sentry_batcher.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch 4 times, most recently from 33f0d1a to d39154d Compare August 3, 2026 08:43
@jpnurmi
jpnurmi changed the base branch from master to jpnurmi/ref/transport-crash-dump August 3, 2026 08:55
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/transport-crash-dump branch from 6fd9e4d to e134668 Compare August 3, 2026 09:39
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from d39154d to 9dee343 Compare August 3, 2026 09:39
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/transport-crash-dump branch from e134668 to 6be63d4 Compare August 3, 2026 12:50
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch 2 times, most recently from 265b68d to 8c2f921 Compare August 3, 2026 12:53
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/transport-crash-dump branch from 6be63d4 to 6883ac0 Compare August 3, 2026 12:53
@jpnurmi jpnurmi changed the title [WIP] perf: serialize telemetry batches on shared thread pool feat(internal): thread pool Aug 4, 2026
Comment thread src/sentry_sync.c
Comment thread src/sentry_sync.c
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/sentry-telemetry branch from 8bfdf9d to cdc41e7 Compare August 4, 2026 12:36
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch from 817d719 to 262608e Compare August 4, 2026 12:37
Comment thread src/sentry_sync.h
Comment thread src/sentry_sync.h
Base automatically changed from jpnurmi/ref/sentry-telemetry to master August 4, 2026 13:51
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/thread-pool branch 2 times, most recently from e9a1eb3 to b7e5602 Compare August 5, 2026 09:46
Comment thread src/sentry_sync.c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b38d5fb. Configure here.

Comment thread src/sentry_sync.c
Comment thread src/sentry_sync.h Outdated
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.

1 participant