Campfyre
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
fil@programming.dev to Rust@programming.devEnglish · 2 years ago

Async Rust Is A Bad Language

bitbashing.io

external-link
message-square
24
fedilink
  • cross-posted to:
  • [email protected]
  • [email protected]
44
external-link

Async Rust Is A Bad Language

bitbashing.io

fil@programming.dev to Rust@programming.devEnglish · 2 years ago
message-square
24
fedilink
  • cross-posted to:
  • [email protected]
  • [email protected]
Yet another programming blog. Thoughts on software and related misadventures.
  • Júlio Gardona@mastodon.social
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 years ago

    @sugar_in_your_tea #golang is a near perfect aproach for writing concurrency and async code, indeed, but rust already has channels in standard library. My github has a lot of concurrency code using only std library, including examples in atomics, channels, mutexes, conditional variables, etc…

    https://doc.rust-lang.org/rust-by-example/std_misc/channels.html

    https://github.com/jcbritobr/concprog/blob/master/src/threadpool.rs

    https://github.com/jcbritobr/concprog/blob/master/src/channels.rs

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Huh, it has been a while since I did async in Rust. I used Actix to build a multi-protocol game server for a toy project, and the only state staring needed went through the database.

      I’ll have to play with async Rust some more. I’ve looked through a lot of async code, and while it looks gross, I haven’t actually written much myself to really get a feel for the ergonomics. For other projects, I’ve just used threads and mutexes, which has been plenty. The closest I’ve gotten was messing with GUIs, but that’s been mostly GTK or IMGUI, which have their own synchronization patterns.

      So maybe it’s good enough as is.

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.

  • 2 users / day
  • 120 users / week
  • 354 users / month
  • 2.73K users / 6 months
  • 1 local subscriber
  • 7.12K subscribers
  • 931 Posts
  • 4.34K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org