Comments (5)
Regardless of API, this would still be likely blocked by #12.
from jstime.
Can we do a promise version instead?
from jstime.
@devsnek we could, although I will admit I fail to see value in creating a new timer API that is specific to JSTime. might be worth discussing with HTML + maybe node (deno?) if other platforms would be interested in a promise based API as well
from jstime.
Definitely interesting that the JavaScript runtime extensions are implemented in deno_cli not deno_core
As pointed by @bengl timers require event loop. deno_core
is agnostic of event loop used and thus timer are implemented in deno_cli
(and are built on top of Tokio). The whole timers code is quite complex at the moment because Tokio doesn't support ordered timers (tokio-rs/tokio#1775)
FYI - we'll be moving those APIs to a separate crate in near(-ish) future.
from jstime.
for timers I would expect a thread with a timer wheel anyway, so not a huge issue for tokio to not be involved.
from jstime.
Related Issues (20)
- Broadening collaborators and creating open governance
- Support Top-Level Await HOT 2
- Support WHATWG Streams HOT 2
- Improve the docs HOT 2
- MacOS Binaries need to be notarized HOT 7
- Stack traces no longer working HOT 2
- Errors in run JavaScript code still have exit code of 0 HOT 1
- ESM Builtins
- store repl history between sessions HOT 1
- implement import.meta.url
- Implement WHATWG URL api HOT 2
- Should we implement NAPI? HOT 3
- Should we allow PRs with no review to land after a certain amount of time?
- Are web-compat builtins actually a goal? HOT 5
- jstime_core: Modularizing builtins
- Release action is busted HOT 1
- Compilation failure when installing via `cargo install jstime` HOT 5
- wasm modules
- json modules HOT 4
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 jstime.