Comments (1)
So basically it's because the Promise.all
is taking care of setting the items in the right place. The array push does it in the order at which it arrives, which is why it's non-sequential. Although Promise.all
has its output array matching the input promises :)
Have a look at that example
const arr = []
const p0 = new Promise((resolve, reject) => setTimeout(() => {
arr.push('foo1')
resolve('foo1')
}, 1000))
const p1 = new Promise((resolve, reject) => setTimeout(() => {
arr.push('foo2')
resolve('foo2')
}, 100))
Promise.all([p0, p1]).then(values => {
console.log('yay in the right order!', values)
console.log('oh noes', arr)
})
from live-torrent.
Related Issues (19)
- Need compilation example for deployment as a static js file over php HOT 1
- Improve p2p/server ratio HOT 2
- Create HLS video streaming P2P HOT 1
- Use WebSeed for the server HOT 3
- Error: Command failed: ffprobe -v error -show_format -show_streams /tmp/hls/undefined /tmp/hls/undefined: No such file or directory HOT 4
- Browser-only implementation HOT 1
- Error executing live-torrent in ubuntu16.04 HOT 1
- [Question] How does live-torrent create/destroy many torrents at a time and remain responsive? HOT 6
- Uncaught TypeError: Cannot read property 'register' of undefined HOT 1
- How to make live-torrent work with VOD HLS? HOT 1
- I have a question HOT 1
- Please help - 1000 ppl crash (how to scale) HOT 1
- Quick question?
- error streaming m3u8 HOT 1
- CLI tool is throwing errors HOT 6
- Can we put just manifest as CLI argument HOT 3
- Can the client script use a feed directly from the webcam or attached camera? HOT 1
- Simple functionality request for didlie.com HOT 1
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 live-torrent.