Skip to content

Comments

chore(database): avoid panic by conditionally using block_in_place#2927

Merged
rakita merged 2 commits intobluealloy:mainfrom
radik878:fix/asyncdb-conditional-block-in-place
Sep 12, 2025
Merged

chore(database): avoid panic by conditionally using block_in_place#2927
rakita merged 2 commits intobluealloy:mainfrom
radik878:fix/asyncdb-conditional-block-in-place

Conversation

@radik878
Copy link
Contributor

Use block_in_place only when currently inside a multi-thread Tokio runtime; fallback to handle.block_on outside a runtime or on current-thread runtime. Aligns behavior with WrapDatabaseAsync::with_handle docs and prevents panics when used from sync contexts.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 28, 2025

CodSpeed Performance Report

Merging #2927 will not alter performance

Comparing radik878:fix/asyncdb-conditional-block-in-place (21e3512) with main (c3d2689)

Summary

✅ 173 untouched benchmarks

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm

@rakita rakita merged commit 60f06c0 into bluealloy:main Sep 12, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Sep 12, 2025
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