yona-lang / yona

Yona is a modern take on a dynamic general-purpose programming language with advanced functional programming, minimalistic ML-like syntax, strict evaluation, for GraalVM polyglot virtual machine (VM).
https://yona-lang.org/
GNU General Public License v3.0
127 stars 6 forks source link

Solve the issue with threads not being closed after calling context.close() #48

Closed akovari closed 4 years ago

akovari commented 4 years ago
Exception in thread "main" org.graalvm.polyglot.PolyglotException: java.lang.IllegalStateException: The language did not complete all polyglot threads but should have: [Thread[Polyglot-yatta-6,5,yatta-io], Thread[Polyglot-yatta-7,5,yatta-io]]
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.dispose(PolyglotLanguageContext.java:351)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.disposeContext(PolyglotContextImpl.java:1153)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.closeImpl(PolyglotContextImpl.java:1072)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.close(PolyglotContextImpl.java:873)
        at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:645)
        at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:666)
        at yatta.Launcher.executeSource(Launcher.java:62)
        at yatta.Launcher.main(Launcher.java:37)
Original Internal Error:
java.lang.IllegalStateException: The language did not complete all polyglot threads but should have: [Thread[Polyglot-yatta-6,5,yatta-io], Thread[Polyglot-yatta-7,5,yatta-io]]
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.dispose(PolyglotLanguageContext.java:351)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.disposeContext(PolyglotContextImpl.java:1153)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.closeImpl(PolyglotContextImpl.java:1072)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.close(PolyglotContextImpl.java:873)
        at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:645)
        at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:666)
        at yatta.Launcher.executeSource(Launcher.java:62)
        at yatta.Launcher.main(Launcher.java:37)
Caused by: Attached Guest Language Frames (0)