Language: 漢語
08-01, 11:50–12:20 (Asia/Taipei), RB105 - Main Track
30
Translate Title –What is synchronization & concurrency in JavaScript - Use a TypeScript task queue library to introduce
Abstract –你有聽過 JavaScript 是單一執行緒的語言嗎? 你知道 JavaScript 的 async 的原理嗎? 你知道什麼時候會需要控制 concurrency 的情形嗎? 本演講除了會為你一一解答外,還會帶著你走一遍如何實作出一個開源的 task queue library,以及如何在 TypeScript 中實作出其他語言 (e.g. Java) 的 @synchronized decorator.
大綱:
1. 介紹 JavaScript 的 async, concurrency - 4 min
2. 介紹為何要打造 task queue library - 4 min
3. 實際講解程式碼跟範例 - 17 min
- 使用 @synchronized, @concurrent 在 method 上
- 一般 async/promising return/sync function 型式的使用方法
- 講解程式碼
4. Q & A - 5min
Have you ever heard that JavaScript is a single thread language? Do you know what is async in JavaScript? Do you know when you need to control the concurrency situation in your code? This talk will give you a guide on how to make an open-source task queue library, and how to use TypeScript to make a @synchronized decorator often seen in other languages, like Java.
Outline:
1. Introduction what is async and concurrency in JavaScript - 4 min
2. Introduce why do we need a task queue library - 4 min
3. Go through the code and its example - 17 min
- use @synchronized, @concurrent on method
- use async function, promising-returning function, syn function into queue
- go through the code
4. Q & A - 5 min
https://hackmd.io/@coscup/rymNETD0O/%2F%40coscup%2FS1_zETwCO
slido url –