logoalt Hacker News

haolezyesterday at 7:20 PM5 repliesview on HN

I was pretty surprised when I learned recently that the Java alternative for green threads doesn't use colored functions. It put Java in a higher place in my perception.


Replies

zokieryesterday at 10:21 PM

It doesn't completely solve function coloring though. Causing carrier threads to get pinned is still not good, similarly as calling blocking function from async function is not good in colored systems.

show 1 reply
dmos62yesterday at 7:33 PM

What are colored functions?

show 7 replies
dxxviyesterday at 8:49 PM

No need of colored functions because that Java green thread returns a Future<Value> not Value like colored functions

Groxxyesterday at 7:49 PM

"green threads" is generally how I see these systems identify as "non-colored but with async-like performance" fwiw. or "fibers". otherwise it's "async" or "coroutines".

show 1 reply
antonvsyesterday at 8:08 PM

Are you perhaps confusing green threads with stackless async models, like async/await? Green threads don't imply colored functions.

show 1 reply