Content Warning

This website contains age-restricted materials including nudity and explicit depictions of sexual activity.

By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.

Lemmy NSFW
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
arendjr@programming.dev to Rust@programming.devEnglish · 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
60
external-link

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

emschwartz.me

arendjr@programming.dev to Rust@programming.devEnglish · 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@programming.dev
    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@programming.dev

rust@programming.dev

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.

  • 12 users / day
  • 193 users / week
  • 376 users / month
  • 2.71K users / 6 months
  • 7 local subscribers
  • 6.93K subscribers
  • 752 Posts
  • 3.43K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • UI: 0.19.11-nsfw
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org