20
top 4 comments
sorted by: hot top controversial new old
[-] 2xsaiko@discuss.tchncs.de 5 points 5 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.

[-] Penguincoder@beehaw.org 1 points 5 months ago

stop referring to the “what color is your function”

I am not sure what you mean.

[-] Radiant_sir_radiant@beehaw.org 4 points 5 months ago* (last edited 5 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.

[-] 2xsaiko@discuss.tchncs.de 1 points 5 months ago

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

this post was submitted on 20 Jun 2024
20 points (100.0% liked)

Technology

37738 readers
355 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS