daemon-thread

  • ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ๋ณด์กฐ์ ์ธ ์ž‘์—…์„ ์ˆ˜ํ–‰

  • ๋ชจ๋“  [user-thread] ๊ฐ€ ์ข…๋ฃŒ๋˜๋ฉด [[daemon-thread]] ๋„ ์ข…๋ฃŒ๋จ

  • JVM์€ ๋ฐ๋ชฌ ์Šค๋ ˆ๋“œ์˜ ์‹คํ–‰์™„๋ฃŒ๋ฅผ ๊ธฐ๋Œ€๋ฆฌ์ง€ ์•Š๊ณ  ์ข…๋ฃŒ๋จ

DaemonThread daemonThread = new Thread()
daemonThread.setDaemon(true) // ๋ฐ๋ชฌ ์Šค๋ ˆ๋“œ ์„ค์ •
  • ๊ธฐ๋ณธ์ ์œผ๋กœ thread ๋Š” daemon thread = false ์ž„

์ฐธ๊ณ 

  • https://www.inflearn.com/course/lecture?courseSlug=%EA%B9%80%EC%98%81%ED%95%9C%EC%9D%98-%EC%8B%A4%EC%A0%84-%EC%9E%90%EB%B0%94-%EA%B3%A0%EA%B8%89-1&unitId=232319&tab=curriculum&subtitleLanguage=ko

Last updated