Open Menu
AllLocalCommunitiesAbout
lotide
AllLocalCommunitiesAbout
Login

Concurrency models of Rust and Golang

⁨20⁩ ⁨likes⁩

Submitted ⁨⁨10⁩ ⁨months⁩ ago⁩ by ⁨Penguincoder@beehaw.org⁩ to ⁨technology@beehaw.org⁩

https://kerkour.com/rust-vs-go-concurrency-models-stackfull-vs-stackless-coroutines

source

Comments

Sort:hotnewtop
  • 2xsaiko@discuss.tchncs.de ⁨10⁩ ⁨months⁩ ago

    Can we stop referring to the “what color is your function” post for languages it doesn’t apply for? Contrary to Javascript (where it does apply), Rust with tokio has adapters for both async -> sync (Runtime::spawn_blocking) and sync -> async (Runtime::block_on). It probably isn’t a good idea to overuse spawn_blocking but calling an async function from a sync one is literally no problem.

    source
    • Penguincoder@beehaw.org ⁨10⁩ ⁨months⁩ ago

      stop referring to the “what color is your function”

      I am not sure what you mean.

      source
      • Radiant_sir_radiant@beehaw.org ⁨10⁩ ⁨months⁩ ago

        what color is your function?

        It’s a rant opinion piece about the caveats of mixing async and sync functions, and divides code into ‘red’ (async) and ‘blue’ (sync) functions to explain the various problems associated with it.

        source
      • 2xsaiko@discuss.tchncs.de ⁨10⁩ ⁨months⁩ ago

        I’m talking about the text in the “The problem with async” section in the article you linked in the OP.

        source