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

scala-cli stalls when awaiting every single result from a list of Futures. #2470

Closed
cheapsolutionarchitect opened this issue Oct 17, 2023 · 2 comments · Fixed by #2556
Closed
Assignees
Labels
bug Something isn't working script-wrapper
Projects

Comments

@cheapsolutionarchitect
Copy link

cheapsolutionarchitect commented Oct 17, 2023

Version(s)
scala-cli 1.0.2, 1.0.4, Java 11

Describe the bug

Running the code linked in "To Reproduce" stalls the execution until the timeouts are reached.

To Reproduce

Copy the code provided here https://scastie.scala-lang.org/c8icnGOiSAO6jOoewoFXHw into a file called paralleltest.sc and run it with scala-cli -S 2.13.10 paralleltest.sc

Expected behaviour

Running the code from the Scala 2.13.10 REPL or with sbt finishes the execution without stalling the process. This should be the same for scala-cli.

@cheapsolutionarchitect cheapsolutionarchitect added the bug Something isn't working label Oct 17, 2023
@SethTisue
Copy link
Contributor

@MaciejG604 offhand, this seems like the sort of thing that #2033 should have prevented?

note that the same script succeeds in Scala 3

@MaciejG604
Copy link
Contributor

MaciejG604 commented Oct 19, 2023

Due to the usage of a strictly Scala 3 feature in the class wrapper (export), Scala 2 scripts can't use it and will still suffer from deadlocks when parallelism is used.

However, we may have a solution for that that seems to have been overlooked before.

@Gedochao Gedochao added this to To do in Issue Board via automation Oct 25, 2023
@Gedochao Gedochao moved this from To do to In progress in Issue Board Oct 25, 2023
Issue Board automation moved this from In progress to Done Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment