programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
arendjr to RustEnglish · 9 months ago

Async Rust can be a pleasure to work with (without Send + Sync + 'static)

emschwartz.me

external-link
message-square
8
link
fedilink
61
external-link

Async Rust can be a pleasure to work with (without Send + Sync + 'static)

emschwartz.me

arendjr to RustEnglish · 9 months ago
message-square
8
link
fedilink
Async Rust is powerful. And it can be a pain to work with (and learn). Async Rust can be a pleasure to work with, though, if we can do it without `Send + Sync + 'static`.
  • alienscience
    link
    fedilink
    arrow-up
    4
    ·
    9 months ago

    Despite using Tokio underneath, I think that Actix does NOT do work stealing and uses mostly separate threads:

    • https://actix.rs/docs/server/#multi-threading
    • https://docs.rs/actix-rt/latest/actix_rt/

    Given this architecture, I think the article might inaccurate when it says that Actix handlers must be Send + Sync. See also: https://www.reddit.com/r/rust/comments/14cbe1u/why_does_actixwebs_handler_not_require_send/

    Actix is a bit weird, but it has been around, and used in production, for a relatively long time.

Rust

rust

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 2 users / day
  • 46 users / week
  • 502 users / month
  • 2.91K users / 6 months
  • 1.48K local subscribers
  • 6.98K subscribers
  • 1.02K Posts
  • 4.81K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • EdTheLegendary
  • kahnclusions
  • torcherist
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org