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

Technology

37719 readers
24 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
top 4 comments
sorted by: hot top controversial new old
[–] 2xsaiko@discuss.tchncs.de 5 points 4 months ago (1 children)

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 1 points 4 months ago (2 children)

stop referring to the “what color is your function”

I am not sure what you mean.

[–] Radiant_sir_radiant 4 points 4 months ago* (last edited 4 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 4 months ago

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