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

Variables are lost after callonce java.lang.Thread.sleep() #2548

Open
Serob opened this issue Apr 11, 2024 · 1 comment
Open

Variables are lost after callonce java.lang.Thread.sleep() #2548

Serob opened this issue Apr 11, 2024 · 1 comment

Comments

@Serob
Copy link

Serob commented Apr 11, 2024

After updating to 1.5.0.RC3 or 1.4.1 from the version 1.1.0.RC3 variables started to be lost after using callonce sleep call. And sleep is def sleep = function(pause){ java.lang.Thread.sleep(pause * 1000) }

Here's a Minimal, Reproducible Example.

Expected behavior:
Should print values of myVarName and localVar after callonce sleep.

Actual behavior:
throws an exception for each of them:

org.graalvm.polyglot.PolyglotException: ReferenceError: "myVarName" is not defined

org.graalvm.polyglot.PolyglotException: ReferenceError: "localVar" is not defined
@Serob
Copy link
Author

Serob commented Apr 11, 2024

It is working fine with call instead of callonce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant