Comments (3)
Hi Rolando,
thanks for your question.
Currently, Graal.js does not support multi-threaded Java interop for safety reasons. In particular, we want to make sure that the Java code does not introduce data races with the main Graal.js event loop, which might lead to undefined behavoir (and random crashes). For instance, this might be the case in your example: the res
object is created on the main Graal.js event loop, while res.send()
is called (concurrently) from multiple threads. Since res.send()
writes the HTTP response back to the main event loop, there might be multiple threads all writing to the same (shared) event loop, leading to potential concurrency bugs.
We agree that multi-threaded Java interop would be very useful in Graal.js, and we are currently working on adding safe support for threads to future versions of Graal.js.
from graaljs.
Thanks @eleinadani for your quick answer, I completely understand your points. Will keep an eye on this project updates.
Congratulations for the awesome job being done so far!!!
from graaljs.
@jkyberneees thanks!
from graaljs.
Related Issues (20)
- TypeScript support
- No Graaljs and Graalvm node.js native community jvm images for 23.1.1 for windows HOT 2
- Instanceof check fails for custom error subtype using prototype setup HOT 2
- Allow implementation of delete operation in foreign arrays HOT 1
- Binding is slow HOT 3
- StackOverflowError occurs when converting PloyglotMap to JSON using Gson HOT 1
- Failed to compile when importing graaljs:Types reachable for JIT compilation must not have linkage errors HOT 1
- How to get stacktrace and/or linenumber from java in an async js function HOT 4
- [23.1.2] WarnInterpreterOnly=false is ignored HOT 2
- Cannot call R code - how to install more supported language? HOT 1
- Using Promises setTimeout HOT 1
- polyglot Engine fails to initialize with "NoClassDefFoundError: com/ibm/icu/text/DateFormat" HOT 2
- Better stack trace for module not found error HOT 2
- Adding a classpath while no direct access to Node HOT 2
- Temporal toLocaleString returns ISO string instead of localized text HOT 1
- Parallel ScriptEngine script compilation
- Get (heap) memory usage information
- "ab".split(/(?:ab)*/) crashes graaljs HOT 1
- Losing double type when returning 1.0 from JS HOT 1
- Polyglot version compatibility check failed on GraalVM for JDK 22 Community 22.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graaljs.