Comments (7)
Cargo.toml
[package]
name = "quickjs_runtime"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.43"
futures = "0.3"
log = "0.4.11"
simple-logging = "2.0.2"
quickjs_runtime = "0.5.1"
hirofa_utils = "0.2.1"
from quickjs_es_runtime.
How do you prefer we deal with this? Just log and don't panic or prevent the context from dropping?
from quickjs_es_runtime.
How do you prefer we deal with this? Just log and don't panic or prevent the context from dropping?
I guess we should do similar to the thread dropping. Don't execute any code related to the context once the context is dropped.
Preventing the context from dropping?
Does it mean the runtime knows there are leaked promises during context drop? If so, throwing an error when trying to close a context with leaked promise would be even better.
from quickjs_es_runtime.
Well i'm currently working on the Runtime/Realm adapters in utils and i could rewrite it so Realm(context) has an Rc, when that RC is dropped the context will be dropped. A Promise/Function whatever adapter could have a clone of that Rc so the Realm(context) is actually only dropped when the last Promise is dropped.. allthough i fear this may cause a lot of unintended non-dropping Realms..
So i'm leaning toward just logging and not panicking...
from quickjs_es_runtime.
Agreed. In my case, it's the user code and we have no control over it. So there may be some promises that are left unresolved too.
from quickjs_es_runtime.
could you please check if 0.6.0 fixes this?
from quickjs_es_runtime.
Yes, it did. Thank you so much!
from quickjs_es_runtime.
Related Issues (20)
- timeouts on invocations like call_function and eval HOT 2
- Ability to load pre-compiled modules HOT 11
- Option to disable features - console, setTimeout, setInterval HOT 9
- add console_formatter / console_logger to builder HOT 1
- Feat: function and struct to compute memory usage HOT 1
- Feat: TypedArrays HOT 1
- Panicked when running multiple promises concurrently HOT 2
- Document js_utils methods
- deprecate EsValueFacade HOT 1
- Segmentation fault: 11 & panic when using ScriptModuleLoader<QuickJsRealmAdapter> HOT 7
- fix MemoryUsage impl
- respect memory limit
- Main thread gets stuck randomly while awaiting for promise HOT 18
- thread panic occurred HOT 6
- Support for serde_json HOT 10
- Unexpected error logs even when the promise rejection is handled HOT 7
- Tokio Version in cargo.toml HOT 5
- Typescript support HOT 7
- fork quickjs HOT 6
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 quickjs_es_runtime.