Queue Implementation in Javascript + printer network + promise sequential asynchronous task

preview_player
Показать описание
Learn how to implement a queue data structure by creating a printer network in javascript while using promises to handle sequential asynchronous task

source code:

timeline:
0:00 - queue implementation
1:01 - testing queue implementation
1:33 - printer with queue
2:49 - testing printer queue
3:49 - printer network with queue
4:18 - strategy explanation
4:41 - printer network resume...
6:02 - testing printer network queue

playlist:

follow @:

Рекомендации по теме
Комментарии
Автор

Just discovered your channel and it's just awesome, keep up the good work man.

ankitvishwakarma
Автор

Awesome work dude.
One suggestion
do not use # in the first place while declaring a variable it looks weird.

shubhampaliwal
Автор

at 2:37 can you please explain the use of docCall(); and how it is working?

evolvingbackwards
Автор

This is a great video. All of your video's are amazing. Thanks for your time and effort. One question, why using the recursive approach here? Why not simply iterate over a list of Queue objects and consume those individually? Thanks.

cryptoeraser
Автор

Why do you use # and not let? for declare vars. And what is the name of this form to declare variables??

amilcaroswaldo
Автор

this is very cool, but there is no actual way to interrogate the status of an actual printer through javascript is there?

psychomafia
Автор

Great Job!
just i don't get this line this.enqueue(() => this.print(doc).then((id) => res(id)));
please answer me

takisnani
welcome to shbcf.ru