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

Fix graaljs multithreaded access #17

Merged
merged 3 commits into from
Oct 16, 2023
Merged

Conversation

zampino
Copy link
Collaborator

@zampino zampino commented Oct 13, 2023

Parsing markdown from different threads leads to known exceptions like

java.lang.IllegalStateException: Multi-threaded access requested by thread Thread[http-nio-8778-exec-1,5,main] but is not allowed for language(s) js.

this is an attempt to properly lock graaljs contexts following examples in

https://www.graalvm.org/latest/reference-manual/js/Multithreading/#multithreading-with-java-and-javascript

@zampino zampino marked this pull request as ready for review October 13, 2023 16:14
@zampino zampino changed the title Fix graaljs multithreading Fix graaljs multithreaded access Oct 13, 2023
daslu added a commit to scicloj/clay that referenced this pull request Oct 13, 2023
@mk
Copy link
Member

mk commented Oct 14, 2023

@zampino can you give 2b0d579 a look? Not sure why we'd need a macro for the locking.

@zampino zampino merged commit 42f2900 into main Oct 16, 2023
7 checks passed
@zampino zampino deleted the fix-graaljs-multithreading branch October 16, 2023 08:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants