Files
artcraft/playground/ts_playground.js
T
ArEnSc 04ec557da1 Feature-Streaming Frames and FFMPEG (#671)
Removed FF MPEG
Added New Rendering code using web workers and zipping and uploading.
Added a New endpoint to upload a bucket of frames.
2024-08-30 19:22:37 -04:00

36 lines
621 B
JavaScript

class Network {
constructor() {}
async sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async task1() {
console.log("World.");
let val = true;
while (val) {
await this.sleep(1000);
console.log("Task1 doing work.");
}
//throw Error("Ded World.")
}
async task2() {
console.log("Hello.");
let val = true;
while (val) {
await this.sleep(1000);
console.log("Task2 doing work.");
}
//throw Error("Ded Hello.")
}
}
const network = new Network();
async function main() {
network.task1();
network.task2();
}
main();