Avoid eval for GraalVM#136
Conversation
|
@niwinz Unrelated to this PR: I noticed that promesa now always picks a virtual thread executor by default if it's available. Is this intentional? Are virtual thread absolutely always better or should the user still have a choice? |
|
Btw, I think the failing tests aren't due to this PR, but just flakiness in general. |
I'm not aware of it, can you show me an example? There are different thread constructors for different purposes and if the default one is a vthread it should be a bug. |
yep, I'm aware of it, I need to take time to fix it properly, sometimes tests fails... |
|
@niwinz My bad about the default: didn't look closely enough, seems good. PR should be ready now unless you have more feedback. |
|
@borkdude 👍 I will try fix the randomly failing test also |
|
Sorry, one failure now in JDK19 which I will fix. |
|
Sorry not done yet, the code still doesn't run well if you don't provide |
|
Should be ok now. |
|
Feel free to re-trigger Github Actions to have some more confidence that I didn't screw something up. |
|
@niwinz Actually I'm not sure if spinning up a thread at compile time is something that GraalVM would like. I'll test this locally. |
|
I have merged the current PR, but feel free to open a new one, maybe we can think in an other approach. |
|
I merged it with command line, squahing your commits |
Hah, well that's quite innocent I guess. Thanks. |
|
I tested this PR with my native image and I don't get any runtime errors anymore 👍 |
Promesa doesn't work on GraalVM due to runtime (non-top-level) usage of
eval.This PR avoids doing that and decides at compile time which branch should be taken.