Skip to content

fix: make async runtime and context Send/Sync without parallel feature#680

Closed
richarddd wants to merge 1 commit intoDelSkayn:masterfrom
richarddd:fix/async-with-send-bound
Closed

fix: make async runtime and context Send/Sync without parallel feature#680
richarddd wants to merge 1 commit intoDelSkayn:masterfrom
richarddd:fix/async-with-send-bound

Conversation

@richarddd
Copy link
Copy Markdown
Collaborator

Issue

Fixes #495

Description of changes

AsyncRuntime, AsyncContext, and WithFuture are now unconditionally Send/Sync so async_with can be used with multi-threaded executors without requiring the parallel feature, since the underlying Arc<async_lock::Mutex<_>> is already thread-safe.

Checklist

  • Added change to the changelog
  • Created unit tests for my feature if needed

@Sytten
Copy link
Copy Markdown
Collaborator

Sytten commented Apr 27, 2026

I am very unconvinced about that one. Parallel also enables a bunch of things like Mutex for Ref, JS_UpdateStackTop calls, etc. that are required for it to work correctly multi-threaded.

@richarddd
Copy link
Copy Markdown
Collaborator Author

Yeah true, let's ditch it and close the issue. Better to be safe here

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.

Why does async_with need the future to implement Send?

2 participants