or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
探討 JavaScript 中的 synchronization & concurrency - 以 TypeScript 打造的開源 task queue library 為例 - Grimmer
tags:
COSCUP2021
zh-tw
COSCUP2021
COSCUP 主議程軌
RB105 - Main Track
歡迎來到 https://hackmd.io/@coscup/2021 共筆
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。
Slido: https://app.sli.do/event/c4o018t8
d4c-queue: https://github.com/grimmer0125/d4c-queue
投影片 slide: https://slides.com/grimmer/intro_js_ts_task_queuelib_d4c/
演講 video: https://youtu.be/_wxSAEts35w
async in Javascript
Event loop in main thread 一次只會做一個 code block
會從 task queue 拿 code block 執行
JS runtime 內的 UI event 與 network 會塞 task 進 task queue
task 在 V8 中分兩種
無論是 browser 還是 nodejs 都是一個 macro task 配上多個 micro task