Skip to content

Add blockConcurrencyWhile binding for Durable Objects - #1039

Open
lukevalenta wants to merge 1 commit into
cloudflare:mainfrom
lukevalenta:lvalenta/do-async-init
Open

Add blockConcurrencyWhile binding for Durable Objects#1039
lukevalenta wants to merge 1 commit into
cloudflare:mainfrom
lukevalenta:lvalenta/do-async-init

Conversation

@lukevalenta

Copy link
Copy Markdown
Contributor

NOTE: I used AI to help draft this PR, but I understand and approve the code and think this would be a useful feature for the Rust bindings.

Bind the runtime's blockConcurrencyWhile via State::block_concurrency_while (errors reset the object) and block_concurrency_while_infallible (errors returned as values). This mostly addresses #177, but since a literal async constructor isn't supported we instead document a lazy-init handler pattern.

Bind the runtime's blockConcurrencyWhile via State::block_concurrency_while
(errors reset the object) and block_concurrency_while_infallible (errors
returned as values). Addresses cloudflare#177; a literal async constructor remains
unsupported, so document the lazy-init handler pattern.
@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 2 untouched benchmarks


Comparing lukevalenta:lvalenta/do-async-init (9188a17) with main (5f2d6c9)

Open in CodSpeed

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