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

Ractor WebSockets #912

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Ractor WebSockets #912

merged 1 commit into from
Feb 21, 2025

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Sep 12, 2024

just demo-ing this actor lib: https://crates.io/crates/ractor

@robjtede robjtede force-pushed the ractor branch 3 times, most recently from eb309f8 to f167545 Compare September 13, 2024 14:06
@robjtede robjtede marked this pull request as ready for review February 19, 2025 22:22

let (actor, _handle) = Actor::spawn(None, MyWebSocket, session).await.unwrap();

actix_web::rt::spawn(async move {
Copy link

Choose a reason for hiding this comment

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

we also have utilities in a companion crate which adds the actor protection on top of stream handling, so you can benefit from supervision and cleanly handling streams. https://docs.rs/ractor_actors/latest/ractor_actors/streams/pump/fn.spawn_stream_pump.html

but that's just an aside.

@robjtede robjtede force-pushed the ractor branch 2 times, most recently from 876a8e0 to 0d9dfb2 Compare February 21, 2025 13:09
@robjtede robjtede added this pull request to the merge queue Feb 21, 2025
Merged via the queue into master with commit 3a23784 Feb 21, 2025
4 checks passed
@robjtede robjtede deleted the ractor branch February 21, 2025 13:34
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