Skip to content

Runtime close doesn't wait for tasks #1384

@sgammon

Description

@sgammon

Expected Behavior

(1) File an async task
(2) Exit the runtime immediately
(3) Should wait until the task finishes

Actual Behaviour

(1) File an async task
(2) Exit the runtime immediately
(3) Exits

Stacktrace

java.lang.AssertionError: should exit with code 0, but got -1;
stdout: Established active environments: [dev, cli, jvm]
Verbose logging enabled.
Reading: /home/sam/workspace/elide/README.md
Uncaught fatal exception: java.lang.IllegalStateException: One of the context instances is currently executing. Set cancelIfExecuting to true to stop the execution on this thread.
com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:133)
com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1263)
com.oracle.truffle.polyglot.PolyglotEngineDispatch.close(PolyglotEngineDispatch.java:111)
org.graalvm.polyglot.Engine.close(Engine.java:299)
org.graalvm.polyglot.Engine.close(Engine.java:316)
kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:42)

Steps To Reproduce

See above

Environment Information

  • Operating System: Linux/Ubuntu (WSL)
  • Architecture: x86-64

Runtime

Native

Language

N/A (Default)

Example Application

No response

Version

1.0.0-beta2

Metadata

Metadata

Assignees

Labels

P0bugSomething isn't working

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions