This is pretty awesome and I found myself thinking that Java has gotten a lot nicer since I last used it. Then I saw this identifier: Executors::newVirtualThreadPerTaskExecutor. It took the whole width of my phone. Glad to know Java didn’t lose itself while pursuing new concurrency models!
It’s a pretty good and descriptive name, though? It’s not exactly AbstractVirtualThreadFactoryBeanExecutorFactory
Yeah, just a bit shocking that it took up the width of my screen.
Over time, I am finding myself to prefer longer descriptive names.
This works well for me when touching an unknown code base, or working simultaneously with multiple programming languages.
Avoiding language-specific syntax shortcuts, and code-base specific short-cuts in names – helps, in my view
As language and its standard library offers more and more patterns/constructs – I would expect this kind of long-nameness increase (and I hope do not go in the way of the pre-computer mathematical symbolism in math paper, that make them impenetrable for non-specialist reading).
May be there is a way to add font attributes, for example, or other visually-informative cross-language conventions (that work across all statically-typed languages).
I am not sure that using tabs as a ‘syntax-active’ construct is such a great foray into this area, but I guess, I appreciate, Python’s (Guido’s ) forethought in this area.
I wonder how it differs from the programmer perspective from good old days of green threads in the JVM until 2002 or 2003 or whenever it was.
It used to be that Java on the JVM was doing essentially the Goroutines experience before Go was a thing (by several years).
if I remember right, those coroutine libraries were not providing parallelism, they provided concurrency at the syntax/program level.
Project Loom is essentially enables JVM (not just Java) to establish a low-level platform to develop an erlang-like ecosystem, where a given function call can be wrapped (if needed) in a lightweight thread.
So what exactly is the difference between original green threads and current threads? “Virtual threads bear a superficial similarity to green threads in that they are both managed by the JVM rather than the OS, but this is where the similarity ends. The green threads of the 90s still had large, monolithic stacks.” is not very explanatory. What is a monolithic stack?
So cooperative multitasking? Does it have some dispatch group equivalent?