Repository navigation
feat: Run Redline compiler threads as daemons - #229
Conversation
|
I believe that this problem should be fixed by #228 can you verify? |
|
@andreaTP according to #228, it just seems the runners don't compile anymore, so the only way to hit this now is calling |
andreaTP
left a comment
There was a problem hiding this comment.
@Phoenixxo thanks for explaining, make sense.
The expectation is that running Cranelift at runtime is going to be extremely slow, we are doing it in the testsuite, so it's kinda of "supported"(as you found out), but I'd avoid publicizing it much.
Description
NativeCompilercompiles on a fixed thread pool that is never shut down, meaning you just now have an active JVM running in the background while this goes. Once anything had been compiled at runtime, those threads kept the JVM alive after the application finished. I ran into this as a Minecraft client that hung on quit after loading a mod through Redline.The pool now uses a thread factory that makes daemon threads named
redline-compiler. Compilation works the same way; the threads just no longer keep a finished JVM running. I didn't add a test for this, since checking that a JVM exits needs a separate process, but I can add one if you'd like.