-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
BEbe ๊ฐ๋ฐbe ๊ฐ๋ฐ
Description
ํ์์์๋ ํ์คํฌ์ ๊ฒฝ์ฐ ํ๋ก์ธ์ค๊ฐ ๊ณ์ ์ด์ ์์ด์ CPU ์์์ ๊ณ์ ๋จน๋๋ค.
parent process๊ฐ SIGTERM์ ๋ฐ์ผ๋ฉด, ์์คํฌ๋ฆฝํธ ์คํ์ ํตํด ์๊ธด child process๋ค์ ๋ชจ๋ ์ฃฝ์ฌ๋ฒ๋ ค์ผ ํ๋ค.
์๋๋ ์ด์ ์ด์ ๋ด์ฉ
## ๋ฒ๊ทธ ์ค๋ช
timeout์ด Promise.race๋ก ๊ตฌํ์ด ๋์ด ์๋๋ฐ, 10์ด๊ฐ ์ง๋ timeout์ด ๋๋๋ผ๋ while(true) {} ์ ๊ฐ์ ์ฝ๋๋ ์ทจ์ํ ์ ์์.
## ์์ํ๋ ํด๊ฒฐ ๋ฐฉ๋ฒ
๋์ปค์์ ๋๋ฆฌ๋ ํ๋ ์์ฝ๋์์ timeout์ ์์ผ์ค์ผ ํ๋ค.
## ๋ฒ๊ทธ ์ฌํ ๋ฐฉ๋ฒ
> ์คํฌ๋ฆฐ ์ท ๋ฑ์ ์ฒจ๋ถํด ๋ฒ๊ทธ๋ฅผ ์ด๋ป๊ฒ ์ฌํํ๋์ง ์ค๋ช
ํด ์ฃผ์ธ์
while(true) {} ์ฝ๋๋ฅผ ์ ์ถํ๋ค.
## ๊ด๋ จ ๋งํฌ
Metadata
Metadata
Assignees
Labels
BEbe ๊ฐ๋ฐbe ๊ฐ๋ฐ
Type
Projects
Status
In Progress