Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Loom support #8040

Open
wants to merge 35 commits into
base: series/2.x
Choose a base branch
from
Open

WIP: Loom support #8040

wants to merge 35 commits into from

Conversation

jdegoes
Copy link
Member

@jdegoes jdegoes commented Apr 14, 2023

Add experimental support for Loom, including:

  1. Using the default Loom scheduler
  2. Backing every fiber with a virtual thread (guaranteed 1-to-1 mapping)
  3. Embracing blocking wherever relevant, e.g. when converting a Java Future to a ZIO effect
  4. Eliminating or minimizing synchronized in favor of non-OS-thread blocking constructs like Lock
  5. Introducing dual code paths for every ZIO.async, such that async is no longer used under Loom
  6. Refining ZIO semantics in cases where that's necessary (e.g. green threads cannot shift!)


while (result == null) {
try {
result = thunk.get()
Copy link
Contributor

@guersam guersam May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make the effect run multiple times due to the re-evaluation of the side effecting named parameter => Future[A]?

@WtzLAS
Copy link

WtzLAS commented Sep 26, 2023

any further progress on this?

@domdorn
Copy link
Contributor

domdorn commented Nov 15, 2023

as just mentioned in the spartan session, maybe this
https://index.scala-lang.org/sbt/sbt-multi-release-jar
could allow you to ship one jar with different behavior for loom-aware and non loom-aware JVMs.
E.g. I'm just upgrading all our services to JDK21, so we could already use this there.

@devcdcc
Copy link

devcdcc commented Mar 30, 2024

Hello @jdegoes @adamgfraser any update about it?
:c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants