• dblsaiko
    link
    fedilink
    31 year 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.

    • PenguinCoderOP
      link
      fedilink
      English
      11 year ago

      stop referring to the “what color is your function”

      I am not sure what you mean.

      • dblsaiko
        link
        fedilink
        11 year ago

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